Package org.bouncycastle.tls
Class SRPTlsServer
- java.lang.Object
-
- org.bouncycastle.tls.AbstractTlsPeer
-
- org.bouncycastle.tls.AbstractTlsServer
-
- org.bouncycastle.tls.SRPTlsServer
-
public class SRPTlsServer extends AbstractTlsServer
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]
srpIdentity
protected TlsSRPIdentityManager
srpIdentityManager
protected TlsSRPLoginParameters
srpLoginParameters
-
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 SRPTlsServer(TlsCrypto crypto, TlsSRPIdentityManager srpIdentityManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TlsCredentials
getCredentials()
Return server credentials to use.protected TlsCredentialedSigner
getDSASignerCredentials()
protected TlsCredentialedSigner
getRSASignerCredentials()
int
getSelectedCipherSuite()
TlsSRPLoginParameters
getSRPLoginParameters()
protected int[]
getSupportedCipherSuites()
protected ProtocolVersion[]
getSupportedVersions()
Get theProtocolVersion
values that are supported by this peer.void
processClientExtensions(java.util.Hashtable clientExtensions)
-
Methods inherited from class org.bouncycastle.tls.AbstractTlsServer
allowCertificateStatus, allowEncryptThenMAC, allowMultiCertStatus, allowTruncatedHMac, allowTrustedCAIndication, checkServerExtensions, getAllowedClientCertificateTypes, getCertificateRequest, getCertificateStatus, getCipherSuites, getDetailMessageNoCipherSuite, getDHConfig, getECDHConfig, getExternalPSK, getMaximumDefaultCurveBits, getMaximumDefaultFiniteFieldBits, getMaximumNegotiableCurveBits, getMaximumNegotiableFiniteFieldBits, getNewConnectionID, getNewSessionID, getNewSessionTicket, getProtocolNames, getProtocolVersions, getPSKIdentityManager, getServerExtensions, getServerExtensionsForConnection, getServerSupplementalData, getServerVersion, getSessionToResume, getSupportedGroups, init, isSelectableCipherSuite, notifyClientCertificate, 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, notifyAlertRaised, notifyAlertReceived, notifyCloseHandle, notifyConnectionClosed, 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, getHandshakeResendTimeMillis, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getMaxCertificateChainLength, getMaxHandshakeMessageSize, getPskKeyExchangeModes, getRenegotiationPolicy, notifyAlertRaised, notifyAlertReceived, notifyCloseHandle, notifyConnectionClosed, notifyHandshakeComplete, notifySecureRenegotiation, requiresCloseNotify, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedMasterSecret, shouldUseExtendedPadding, shouldUseGMTUnixTime
-
-
-
-
Field Detail
-
srpIdentityManager
protected TlsSRPIdentityManager srpIdentityManager
-
srpIdentity
protected byte[] srpIdentity
-
srpLoginParameters
protected TlsSRPLoginParameters srpLoginParameters
-
-
Constructor Detail
-
SRPTlsServer
public SRPTlsServer(TlsCrypto crypto, TlsSRPIdentityManager srpIdentityManager)
-
-
Method Detail
-
getDSASignerCredentials
protected TlsCredentialedSigner getDSASignerCredentials() throws java.io.IOException
- Throws:
java.io.IOException
-
getRSASignerCredentials
protected TlsCredentialedSigner getRSASignerCredentials() throws java.io.IOException
- Throws:
java.io.IOException
-
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.
-
getSupportedCipherSuites
protected int[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in classAbstractTlsPeer
-
processClientExtensions
public void processClientExtensions(java.util.Hashtable clientExtensions) throws java.io.IOException
- Specified by:
processClientExtensions
in interfaceTlsServer
- Overrides:
processClientExtensions
in classAbstractTlsServer
- Throws:
java.io.IOException
-
getSelectedCipherSuite
public int getSelectedCipherSuite() throws java.io.IOException
- Specified by:
getSelectedCipherSuite
in interfaceTlsServer
- Overrides:
getSelectedCipherSuite
in classAbstractTlsServer
- Throws:
java.io.IOException
-
getCredentials
public TlsCredentials getCredentials() throws java.io.IOException
Description copied from interface:TlsServer
Return server credentials to use. The returned value may be null, or else it MUST implement exactly one ofTlsCredentialedAgreement
,TlsCredentialedDecryptor
, orTlsCredentialedSigner
, depending on the key exchange that was negotiated.- Returns:
- a TlsCredentials object or null for anonymous key exchanges
- Throws:
java.io.IOException
-
getSRPLoginParameters
public TlsSRPLoginParameters getSRPLoginParameters() throws java.io.IOException
- Specified by:
getSRPLoginParameters
in interfaceTlsServer
- Overrides:
getSRPLoginParameters
in classAbstractTlsServer
- Throws:
java.io.IOException
-
-