Package org.bouncycastle.tls
Class PSKTlsServer
- java.lang.Object
-
- org.bouncycastle.tls.AbstractTlsPeer
-
- org.bouncycastle.tls.AbstractTlsServer
-
- org.bouncycastle.tls.PSKTlsServer
-
public class PSKTlsServer extends AbstractTlsServer
-
-
Field Summary
Fields Modifier and Type Field Description protected TlsPSKIdentityManager
pskIdentityManager
-
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 PSKTlsServer(TlsCrypto crypto, TlsPSKIdentityManager pskIdentityManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TlsCredentials
getCredentials()
Return server credentials to use.ProtocolVersion
getMaximumVersion()
Deprecated.Unused; will be removedTlsPSKIdentityManager
getPSKIdentityManager()
protected TlsCredentialedDecryptor
getRSAEncryptionCredentials()
protected int[]
getSupportedCipherSuites()
protected ProtocolVersion[]
getSupportedVersions()
Get theProtocolVersion
values that are supported by this peer.-
Methods inherited from class org.bouncycastle.tls.AbstractTlsServer
allowCertificateStatus, allowEncryptThenMAC, allowMultiCertStatus, allowTruncatedHMac, allowTrustedCAIndication, checkServerExtensions, getCertificateRequest, getCertificateStatus, getCipherSuites, getDHConfig, getECDHConfig, getMaximumNegotiableCurveBits, getMaximumNegotiableFiniteFieldBits, getNewSessionID, getNewSessionTicket, getProtocolNames, getProtocolVersions, getSelectedCipherSuite, getServerExtensions, getServerExtensionsForConnection, getServerSupplementalData, getServerVersion, getSessionToResume, getSRPLoginParameters, getSupportedGroups, init, isSelectableCipherSuite, notifyClientCertificate, notifyClientVersion, notifyFallback, notifyHandshakeBeginning, notifyOfferedCipherSuites, notifySession, preferLocalCipherSuites, processClientExtensions, processClientSupplementalData, selectCipherSuite, selectDH, selectDHDefault, selectECDH, selectECDHDefault, selectProtocolName, selectProtocolName, shouldSelectProtocolNameEarly
-
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
-
pskIdentityManager
protected TlsPSKIdentityManager pskIdentityManager
-
-
Constructor Detail
-
PSKTlsServer
public PSKTlsServer(TlsCrypto crypto, TlsPSKIdentityManager pskIdentityManager)
-
-
Method Detail
-
getRSAEncryptionCredentials
protected TlsCredentialedDecryptor getRSAEncryptionCredentials() 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
-
getMaximumVersion
public ProtocolVersion getMaximumVersion()
Deprecated.Unused; will be removed
-
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
-
getPSKIdentityManager
public TlsPSKIdentityManager getPSKIdentityManager()
- Specified by:
getPSKIdentityManager
in interfaceTlsServer
- Overrides:
getPSKIdentityManager
in classAbstractTlsServer
-
-