public class MockDTLSServer extends DefaultTlsServer
cipherFactory, clientECPointFormats, clientExtensions, clientVersion, context, eccCipherSuitesOffered, encryptThenMACOffered, maxFragmentLengthOffered, namedCurves, offeredCipherSuites, offeredCompressionMethods, selectedCipherSuite, selectedCompressionMethod, serverECPointFormats, serverExtensions, serverVersion, supportedSignatureAlgorithms, truncatedHMacOffered| Constructor and Description |
|---|
MockDTLSServer() |
| Modifier and Type | Method and Description |
|---|---|
CertificateRequest |
getCertificateRequest() |
protected int[] |
getCipherSuites() |
protected ProtocolVersion |
getMaximumVersion() |
protected ProtocolVersion |
getMinimumVersion() |
protected TlsEncryptionCredentials |
getRSAEncryptionCredentials() |
protected TlsSignerCredentials |
getRSASignerCredentials() |
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. |
createDHEKeyExchange, createDHKeyExchange, createECDHEKeyExchange, createECDHKeyExchange, createRSAKeyExchange, getCredentials, getDHParameters, getDSASignerCredentials, getECDSASignerCredentials, getKeyExchangeallowEncryptThenMAC, allowTruncatedHMac, checkServerExtensions, getCertificateStatus, getCipher, getCompression, getCompressionMethods, getNewSessionTicket, getSelectedCipherSuite, getSelectedCompressionMethod, getServerExtensions, getServerSupplementalData, getServerVersion, init, notifyClientVersion, notifyFallback, notifyOfferedCipherSuites, notifyOfferedCompressionMethods, processClientExtensions, processClientSupplementalData, supportsClientECCCapabilitiesnotifyHandshakeComplete, notifySecureRenegotiation, shouldUseGMTUnixTimeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnotifyHandshakeComplete, notifySecureRenegotiation, 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 - AlertDescriptionprotected int[] getCipherSuites()
getCipherSuites in class DefaultTlsServerpublic 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.IOExceptionprotected ProtocolVersion getMaximumVersion()
getMaximumVersion in class AbstractTlsServerprotected ProtocolVersion getMinimumVersion()
getMinimumVersion in class AbstractTlsServerprotected TlsEncryptionCredentials getRSAEncryptionCredentials() throws java.io.IOException
getRSAEncryptionCredentials in class DefaultTlsServerjava.io.IOExceptionprotected TlsSignerCredentials getRSASignerCredentials() throws java.io.IOException
getRSASignerCredentials in class DefaultTlsServerjava.io.IOException