public class TlsClientImpl
extends org.bouncycastle.crypto.tls.DefaultTlsClient
TlsClient
for the purposes of supporting DTLS-SRTP.Constructor and Description |
---|
TlsClientImpl(DtlsPacketTransformer packetTransformer)
Initializes a new TlsClientImpl instance.
|
Modifier and Type | Method and Description |
---|---|
org.bouncycastle.crypto.tls.TlsAuthentication |
getAuthentication() |
(package private) int |
getChosenProtectionProfile()
Gets the SRTPProtectionProfile negotiated between this DTLS-SRTP
client and its server.
|
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.
|
java.util.Hashtable |
getClientExtensions()
Includes the use_srtp extension in the DTLS extended client
hello.
|
org.bouncycastle.crypto.tls.ProtocolVersion |
getClientVersion()
The implementation of TlsClientImpl always returns
ProtocolVersion.DTLSv10 because ProtocolVersion.DTLSv12
does not work with the Bouncy Castle Crypto APIs at the time of this
writing.
|
(package private) org.bouncycastle.crypto.tls.TlsContext |
getContext()
Gets the TlsContext with which this TlsClient has been
initialized.
|
org.bouncycastle.crypto.tls.ProtocolVersion |
getMinimumVersion() |
void |
init(org.bouncycastle.crypto.tls.TlsClientContext context)
Overrides the super implementation as a simple means of detecting that
the security-related negotiations between the local and the remote
enpoints are starting.
|
void |
notifyAlertRaised(short alertLevel,
short alertDescription,
java.lang.String message,
java.lang.Throwable cause)
Forwards to
packetTransformer . |
void |
processServerExtensions(java.util.Hashtable serverExtensions)
Makes sure that the DTLS extended server hello contains the
use_srtp extension.
|
createDHEKeyExchange, createDHKeyExchange, createECDHEKeyExchange, createECDHKeyExchange, createRSAKeyExchange, getKeyExchange
allowUnexpectedServerExtension, checkForUnexpectedServerExtension, getCipher, getClientHelloRecordLayerVersion, getClientSupplementalData, getCompression, getCompressionMethods, getSessionToResume, isFallback, notifyNewSessionTicket, notifySelectedCipherSuite, notifySelectedCompressionMethod, notifyServerVersion, notifySessionID, processServerSupplementalData
notifyAlertReceived, notifyHandshakeComplete, notifySecureRenegotiation, shouldUseGMTUnixTime
public TlsClientImpl(DtlsPacketTransformer packetTransformer)
packetTransformer
- the PacketTransformer which is
initializing the new instancepublic org.bouncycastle.crypto.tls.TlsAuthentication getAuthentication() throws java.io.IOException
java.io.IOException
int getChosenProtectionProfile()
public int[] getCipherSuites()
getCipherSuites
in interface org.bouncycastle.crypto.tls.TlsClient
getCipherSuites
in class org.bouncycastle.crypto.tls.DefaultTlsClient
public java.util.Hashtable getClientExtensions() throws java.io.IOException
getClientExtensions
in interface org.bouncycastle.crypto.tls.TlsClient
getClientExtensions
in class org.bouncycastle.crypto.tls.AbstractTlsClient
java.io.IOException
public org.bouncycastle.crypto.tls.ProtocolVersion getClientVersion()
getClientVersion
in interface org.bouncycastle.crypto.tls.TlsClient
getClientVersion
in class org.bouncycastle.crypto.tls.AbstractTlsClient
org.bouncycastle.crypto.tls.TlsContext getContext()
public org.bouncycastle.crypto.tls.ProtocolVersion getMinimumVersion()
getMinimumVersion
in class org.bouncycastle.crypto.tls.AbstractTlsClient
public void init(org.bouncycastle.crypto.tls.TlsClientContext context)
init
in interface org.bouncycastle.crypto.tls.TlsClient
init
in class org.bouncycastle.crypto.tls.AbstractTlsClient
public void notifyAlertRaised(short alertLevel, short alertDescription, java.lang.String message, java.lang.Throwable cause)
packetTransformer
.notifyAlertRaised
in interface org.bouncycastle.crypto.tls.TlsPeer
notifyAlertRaised
in class org.bouncycastle.crypto.tls.AbstractTlsPeer
public void processServerExtensions(java.util.Hashtable serverExtensions) throws java.io.IOException
processServerExtensions
in interface org.bouncycastle.crypto.tls.TlsClient
processServerExtensions
in class org.bouncycastle.crypto.tls.AbstractTlsClient
java.io.IOException
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.