public class MockDTLSServer extends DefaultTlsServer
certificateStatusRequest, cipherSuites, clientExtensions, clientProtocolNames, clientSentECPointFormats, context, encryptThenMACOffered, maxFragmentLengthOffered, offeredCipherSuites, selectedCipherSuite, selectedProtocolName, serverExtensions, serverVersion, truncatedHMacOffered| Modifier and Type | Method and Description |
|---|---|
CertificateRequest |
getCertificateRequest() |
protected TlsCredentialedDecryptor |
getRSAEncryptionCredentials() |
protected TlsCredentialedSigner |
getRSASignerCredentials() |
ProtocolVersion[] |
getSupportedVersions() |
void |
notifyAlertRaised(short alertLevel,
short alertDescription,
java.lang.String message,
java.lang.Throwable cause)
This method will be called when an alert is raised by the protocol.
|
void |
notifyAlertReceived(short alertLevel,
short alertDescription)
This method will be called when an alert is received from the remote peer.
|
void |
notifyClientCertificate(Certificate clientCertificate)
Called by the protocol handler to report the client certificate, only if
TlsServer.getCertificateRequest() returned non-null. |
getCredentials, getDSASignerCredentials, getECDSASignerCredentials, getSupportedCipherSuitesallowCertificateStatus, allowEncryptThenMAC, allowTruncatedHMac, checkServerExtensions, getCertificateStatus, getCipherSuites, getDHConfig, getECDHConfig, getMaximumNegotiableCurveBits, getMaximumNegotiableFiniteFieldBits, getNewSessionTicket, getProtocolNames, getPSKIdentityManager, getSelectedCipherSuite, getServerExtensions, getServerSupplementalData, getServerVersion, getSessionToResume, getSRPLoginParameters, init, isSelectableCipherSuite, notifyClientVersion, notifyFallback, notifyHandshakeBeginning, notifyOfferedCipherSuites, preferLocalCipherSuites, processClientExtensions, processClientSupplementalData, selectCipherSuite, selectDH, selectDHDefault, selectECDH, selectECDHDefault, selectProtocolName, selectProtocolName, shouldSelectProtocolNameEarlycancel, getCrypto, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getRenegotiationPolicy, notifyCloseHandle, notifyHandshakeComplete, notifySecureRenegotiation, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedPadding, shouldUseGMTUnixTimeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancel, getCrypto, getHandshakeTimeoutMillis, getHeartbeat, getHeartbeatPolicy, getKeyExchangeFactory, getRenegotiationPolicy, notifyCloseHandle, notifyHandshakeComplete, notifySecureRenegotiation, requiresExtendedMasterSecret, shouldCheckSigAlgOfPeerCerts, shouldUseExtendedPadding, shouldUseGMTUnixTimepublic void notifyAlertRaised(short alertLevel,
short alertDescription,
java.lang.String message,
java.lang.Throwable cause)
TlsPeernotifyAlertRaised in interface TlsPeernotifyAlertRaised in class AbstractTlsPeeralertLevel - AlertLevelalertDescription - AlertDescriptionmessage - A human-readable message explaining what caused this alert. May be null.cause - The Throwable that caused this alert to be raised. May be null.public void notifyAlertReceived(short alertLevel,
short alertDescription)
TlsPeernotifyAlertReceived in interface TlsPeernotifyAlertReceived in class AbstractTlsPeeralertLevel - AlertLevelalertDescription - AlertDescriptionpublic CertificateRequest getCertificateRequest() throws java.io.IOException
getCertificateRequest in interface TlsServergetCertificateRequest in class AbstractTlsServerjava.io.IOExceptionpublic void notifyClientCertificate(Certificate clientCertificate) throws java.io.IOException
TlsServerTlsServer.getCertificateRequest() returned non-null.
Note: this method is responsible for certificate verification and validation.notifyClientCertificate in interface TlsServernotifyClientCertificate in class AbstractTlsServerclientCertificate - the effective client certificate (may be an empty chain).java.io.IOExceptionpublic ProtocolVersion[] getSupportedVersions()
getSupportedVersions in interface TlsPeergetSupportedVersions in class AbstractTlsPeerprotected TlsCredentialedDecryptor getRSAEncryptionCredentials() throws java.io.IOException
getRSAEncryptionCredentials in class DefaultTlsServerjava.io.IOExceptionprotected TlsCredentialedSigner getRSASignerCredentials() throws java.io.IOException
getRSASignerCredentials in class DefaultTlsServerjava.io.IOException