Class TlsServerImpl
- java.lang.Object
-
- org.bouncycastle.tls.AbstractTlsPeer
-
- org.bouncycastle.tls.AbstractTlsServer
-
- org.bouncycastle.tls.DefaultTlsServer
-
- org.jitsi.impl.neomedia.transform.dtls.TlsServerImpl
-
- All Implemented Interfaces:
org.bouncycastle.tls.TlsPeer,org.bouncycastle.tls.TlsServer
public class TlsServerImpl extends org.bouncycastle.tls.DefaultTlsServerImplementsTlsServerfor the purposes of supporting DTLS-SRTP.- Author:
- Lyubomir Marinov
-
-
Field Summary
-
Fields inherited from class org.bouncycastle.tls.AbstractTlsServer
certificateStatusRequest, cipherSuites, clientExtensions, clientProtocolNames, clientSentECPointFormats, context, encryptThenMACOffered, maxFragmentLengthOffered, offeredCipherSuites, protocolVersions, selectedCipherSuite, selectedProtocolName, serverExtensions, statusRequestV2, truncatedHMacOffered, trustedCAKeys
-
-
Constructor Summary
Constructors Constructor Description TlsServerImpl(DtlsPacketTransformer packetTransformer)Initializes a new TlsServerImpl instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.tls.CertificateRequestgetCertificateRequest()int[]getCipherSuites()Overrides the super implementation to explicitly specify cipher suites which we know to be supported by Bouncy Castle and provide Perfect Forward Secrecy.HashtablegetServerExtensions()Includes the use_srtp extension in the DTLS extended server hello.voidnotifyAlertRaised(short alertLevel, short alertDescription, String message, Throwable cause)Forwards topacketTransformer.voidnotifyClientCertificate(org.bouncycastle.tls.Certificate clientCertificate)voidnotifyHandshakeComplete()voidprocessClientExtensions(Hashtable clientExtensions)Makes sure that the DTLS extended client hello contains the use_srtp extension.-
Methods inherited from class org.bouncycastle.tls.DefaultTlsServer
getCredentials, getDSASignerCredentials, getECDSASignerCredentials, getRSAEncryptionCredentials, getRSASignerCredentials, getSupportedCipherSuites
-
Methods inherited from class org.bouncycastle.tls.AbstractTlsServer
allowCertificateStatus, allowEncryptThenMAC, allowMultiCertStatus, allowTruncatedHMac, allowTrustedCAIndication, checkServerExtensions, getAllowedClientCertificateTypes, getCertificateStatus, getDetailMessageNoCipherSuite, getDHConfig, getECDHConfig, getExternalPSK, getMaximumNegotiableCurveBits, getMaximumNegotiableFiniteFieldBits, getNewConnectionID, getNewSessionID, getNewSessionTicket, getProtocolNames, getProtocolVersions, getPSKIdentityManager, getSelectedCipherSuite, getServerExtensionsForConnection, getServerSupplementalData, getServerVersion, getSessionToResume, getSRPLoginParameters, getSupportedGroups, init, isSelectableCipherSuite, notifyClientVersion, notifyFallback, notifyHandshakeBeginning, notifyOfferedCipherSuites, notifySession, preferLocalCipherSuites, preferLocalClientCertificateTypes, processClientSupplementalData, selectCipherSuite, selectDH, selectDHDefault, selectECDH, selectECDHDefault, selectProtocolName, selectProtocolName, shouldSelectProtocolNameEarly
-
Methods inherited from class org.bouncycastle.tls.AbstractTlsPeer
allowLegacyResumption, cancel, getCrypto, getHandshakeResendTimeMillis, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getMaxCertificateChainLength, getMaxHandshakeMessageSize, getPskKeyExchangeModes, getRenegotiationPolicy, getSupportedVersions, notifyAlertReceived, notifyCloseHandle, notifyConnectionClosed, notifySecureRenegotiation, requiresCloseNotify, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedMasterSecret, shouldUseExtendedPadding, shouldUseGMTUnixTime
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bouncycastle.tls.TlsPeer
allowLegacyResumption, cancel, getCrypto, getHandshakeResendTimeMillis, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getMaxCertificateChainLength, getMaxHandshakeMessageSize, getPskKeyExchangeModes, getRenegotiationPolicy, notifyAlertReceived, notifyCloseHandle, notifyConnectionClosed, notifySecureRenegotiation, requiresCloseNotify, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedMasterSecret, shouldUseExtendedPadding, shouldUseGMTUnixTime
-
-
-
-
Constructor Detail
-
TlsServerImpl
public TlsServerImpl(DtlsPacketTransformer packetTransformer)
Initializes a new TlsServerImpl instance.- Parameters:
packetTransformer- the PacketTransformer which is initializing the new instance
-
-
Method Detail
-
getCertificateRequest
public org.bouncycastle.tls.CertificateRequest getCertificateRequest()
- Specified by:
getCertificateRequestin interfaceorg.bouncycastle.tls.TlsServer- Overrides:
getCertificateRequestin classorg.bouncycastle.tls.AbstractTlsServer
-
getCipherSuites
public int[] getCipherSuites()
Overrides the super implementation to explicitly specify cipher suites which we know to be supported by Bouncy Castle and provide Perfect Forward Secrecy.- Specified by:
getCipherSuitesin interfaceorg.bouncycastle.tls.TlsPeer- Overrides:
getCipherSuitesin classorg.bouncycastle.tls.AbstractTlsServer
-
getServerExtensions
public Hashtable getServerExtensions() throws IOException
Includes the use_srtp extension in the DTLS extended server hello.- Specified by:
getServerExtensionsin interfaceorg.bouncycastle.tls.TlsServer- Overrides:
getServerExtensionsin classorg.bouncycastle.tls.AbstractTlsServer- Throws:
IOException
-
notifyAlertRaised
public void notifyAlertRaised(short alertLevel, short alertDescription, String message, Throwable cause)Forwards topacketTransformer.- Specified by:
notifyAlertRaisedin interfaceorg.bouncycastle.tls.TlsPeer- Overrides:
notifyAlertRaisedin classorg.bouncycastle.tls.AbstractTlsPeer
-
notifyHandshakeComplete
public void notifyHandshakeComplete()
- Specified by:
notifyHandshakeCompletein interfaceorg.bouncycastle.tls.TlsPeer- Overrides:
notifyHandshakeCompletein classorg.bouncycastle.tls.AbstractTlsPeer
-
notifyClientCertificate
public void notifyClientCertificate(org.bouncycastle.tls.Certificate clientCertificate) throws IOException- Specified by:
notifyClientCertificatein interfaceorg.bouncycastle.tls.TlsServer- Overrides:
notifyClientCertificatein classorg.bouncycastle.tls.AbstractTlsServer- Throws:
IOException
-
processClientExtensions
public void processClientExtensions(Hashtable clientExtensions) throws IOException
Makes sure that the DTLS extended client hello contains the use_srtp extension.- Specified by:
processClientExtensionsin interfaceorg.bouncycastle.tls.TlsServer- Overrides:
processClientExtensionsin classorg.bouncycastle.tls.AbstractTlsServer- Throws:
IOException
-
-