Package org.bouncycastle.crypto.tls
Interface TlsPeer
-
- All Known Implementing Classes:
AbstractTlsClient,AbstractTlsPeer,AbstractTlsServer,DefaultTlsClient,DefaultTlsServer,MockDTLSClient,MockDTLSServer,PSKTlsClient,PSKTlsServer,SRPTlsClient,SRPTlsServer
public interface TlsPeer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TlsCiphergetCipher()TlsCompressiongetCompression()voidnotifyAlertRaised(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.voidnotifyAlertReceived(short alertLevel, short alertDescription)This method will be called when an alert is received from the remote peer.voidnotifyHandshakeComplete()Notifies the peer that the handshake has been successfully completed.voidnotifySecureRenegotiation(boolean secureNegotiation)booleanshouldUseGMTUnixTime()draft-mathewson-no-gmtunixtime-00 2.
-
-
-
Method Detail
-
shouldUseGMTUnixTime
boolean shouldUseGMTUnixTime()
draft-mathewson-no-gmtunixtime-00 2. "If existing users of a TLS implementation may rely on gmt_unix_time containing the current time, we recommend that implementors MAY provide the ability to set gmt_unix_time as an option only, off by default."- Returns:
trueif the current time should be used in the gmt_unix_time field of Random, orfalseif gmt_unix_time should contain a cryptographically random value.
-
notifySecureRenegotiation
void notifySecureRenegotiation(boolean secureNegotiation) throws java.io.IOException- Throws:
java.io.IOException
-
getCompression
TlsCompression getCompression() throws java.io.IOException
- Throws:
java.io.IOException
-
getCipher
TlsCipher getCipher() throws java.io.IOException
- Throws:
java.io.IOException
-
notifyAlertRaised
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.- Parameters:
alertLevel-AlertLevelalertDescription-AlertDescriptionmessage- A human-readable message explaining what caused this alert. May be null.cause- TheThrowablethat caused this alert to be raised. May be null.
-
notifyAlertReceived
void notifyAlertReceived(short alertLevel, short alertDescription)This method will be called when an alert is received from the remote peer.- Parameters:
alertLevel-AlertLevelalertDescription-AlertDescription
-
notifyHandshakeComplete
void notifyHandshakeComplete() throws java.io.IOExceptionNotifies the peer that the handshake has been successfully completed.- Throws:
java.io.IOException
-
-