Package org.bouncycastle.tls
Class SRPTlsClient
- java.lang.Object
-
- org.bouncycastle.tls.AbstractTlsPeer
-
- org.bouncycastle.tls.AbstractTlsClient
-
- org.bouncycastle.tls.SRPTlsClient
-
public class SRPTlsClient extends AbstractTlsClient
-
-
Field Summary
Fields Modifier and Type Field Description protected TlsSRPIdentity
srpIdentity
-
Fields inherited from class org.bouncycastle.tls.AbstractTlsClient
cipherSuites, context, protocolVersions, supportedGroups, supportedSignatureAlgorithms, supportedSignatureAlgorithmsCert
-
-
Constructor Summary
Constructors Constructor Description SRPTlsClient(TlsCrypto crypto, byte[] identity, byte[] password)
SRPTlsClient(TlsCrypto crypto, TlsSRPIdentity srpIdentity)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TlsAuthentication
getAuthentication()
java.util.Hashtable
getClientExtensions()
ProtocolVersion
getClientVersion()
Deprecated.Unused; will be removedTlsSRPIdentity
getSRPIdentity()
protected int[]
getSupportedCipherSuites()
protected ProtocolVersion[]
getSupportedVersions()
Get theProtocolVersion
values that are supported by this peer.void
processServerExtensions(java.util.Hashtable serverExtensions)
The TlsClientProtocol implementation validates that any server extensions received correspond to client extensions sent.protected boolean
requireSRPServerExtension()
-
Methods inherited from class org.bouncycastle.tls.AbstractTlsClient
allowUnexpectedServerExtension, checkForUnexpectedServerExtension, getCertificateAuthorities, getCertificateStatusRequest, getCipherSuites, getClientSupplementalData, getDHGroupVerifier, getEarlyKeyShareGroups, getMultiCertStatusRequest, getNamedGroupRoles, getProtocolNames, getProtocolVersions, getPSKIdentity, getSessionToResume, getSNIServerNames, getSRPConfigVerifier, getSupportedGroups, getSupportedSignatureAlgorithms, getSupportedSignatureAlgorithmsCert, getTrustedCAIndication, init, isFallback, notifyHandshakeBeginning, notifyNewSessionTicket, notifySelectedCipherSuite, notifyServerVersion, notifySessionID, notifySessionToResume, processServerSupplementalData
-
Methods inherited from class org.bouncycastle.tls.AbstractTlsPeer
allowLegacyResumption, cancel, getCrypto, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getMaxCertificateChainLength, getMaxHandshakeMessageSize, getRenegotiationPolicy, notifyAlertRaised, notifyAlertReceived, notifyCloseHandle, notifyHandshakeComplete, 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, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getMaxCertificateChainLength, getMaxHandshakeMessageSize, getRenegotiationPolicy, notifyAlertRaised, notifyAlertReceived, notifyCloseHandle, notifyHandshakeComplete, notifySecureRenegotiation, requiresCloseNotify, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedMasterSecret, shouldUseExtendedPadding, shouldUseGMTUnixTime
-
-
-
-
Field Detail
-
srpIdentity
protected TlsSRPIdentity srpIdentity
-
-
Constructor Detail
-
SRPTlsClient
public SRPTlsClient(TlsCrypto crypto, byte[] identity, byte[] password)
-
SRPTlsClient
public SRPTlsClient(TlsCrypto crypto, TlsSRPIdentity srpIdentity)
-
-
Method Detail
-
getSupportedCipherSuites
protected int[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in classAbstractTlsPeer
-
getSupportedVersions
protected ProtocolVersion[] getSupportedVersions()
Description copied from class:AbstractTlsPeer
Get theProtocolVersion
values that are supported by this peer. WARNING: Mixing DTLS and TLS versions in the returned array is currently NOT supported. Use a separate (sub-)class for each case.- Overrides:
getSupportedVersions
in classAbstractTlsPeer
- Returns:
- an array of supported
ProtocolVersion
values.
-
requireSRPServerExtension
protected boolean requireSRPServerExtension()
-
getClientVersion
public ProtocolVersion getClientVersion()
Deprecated.Unused; will be removed
-
getClientExtensions
public java.util.Hashtable getClientExtensions() throws java.io.IOException
- Specified by:
getClientExtensions
in interfaceTlsClient
- Overrides:
getClientExtensions
in classAbstractTlsClient
- Throws:
java.io.IOException
-
processServerExtensions
public void processServerExtensions(java.util.Hashtable serverExtensions) throws java.io.IOException
Description copied from interface:TlsClient
The TlsClientProtocol implementation validates that any server extensions received correspond to client extensions sent. If further processing of the server extensions is needed, it can be done in this callback. NOTE: This is not called for session resumption handshakes.- Specified by:
processServerExtensions
in interfaceTlsClient
- Overrides:
processServerExtensions
in classAbstractTlsClient
- Parameters:
serverExtensions
- (Integer -> byte[])- Throws:
java.io.IOException
-
getSRPIdentity
public TlsSRPIdentity getSRPIdentity()
- Specified by:
getSRPIdentity
in interfaceTlsClient
- Overrides:
getSRPIdentity
in classAbstractTlsClient
-
getAuthentication
public TlsAuthentication getAuthentication() throws java.io.IOException
- Throws:
java.io.IOException
-
-