public abstract class AbstractTlsPeer extends java.lang.Object implements TlsPeer
Modifier | Constructor and Description |
---|---|
protected |
AbstractTlsPeer(TlsCrypto crypto) |
Modifier and Type | Method and Description |
---|---|
TlsCrypto |
getCrypto() |
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 |
notifyHandshakeComplete()
Notifies the peer that the handshake has been successfully completed.
|
void |
notifySecureRenegotiation(boolean secureRenegotiation) |
boolean |
shouldUseExtendedPadding()
See RFC 5246 6.2.3.2.
|
boolean |
shouldUseGMTUnixTime()
draft-mathewson-no-gmtunixtime-00 2.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCipher, getCompression
protected AbstractTlsPeer(TlsCrypto crypto)
public boolean shouldUseExtendedPadding()
TlsPeer
shouldUseExtendedPadding
in interface TlsPeer
true
if random extra padding should be added during block cipher
encryption, or false
to always use the minimum amount of required
padding.public boolean shouldUseGMTUnixTime()
TlsPeer
shouldUseGMTUnixTime
in interface TlsPeer
true
if the current time should be used in the gmt_unix_time field of
Random, or false
if gmt_unix_time should contain a cryptographically
random value.public void notifySecureRenegotiation(boolean secureRenegotiation) throws java.io.IOException
notifySecureRenegotiation
in interface TlsPeer
java.io.IOException
public void notifyAlertRaised(short alertLevel, short alertDescription, java.lang.String message, java.lang.Throwable cause)
TlsPeer
notifyAlertRaised
in interface TlsPeer
alertLevel
- AlertLevel
alertDescription
- AlertDescription
message
- 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)
TlsPeer
notifyAlertReceived
in interface TlsPeer
alertLevel
- AlertLevel
alertDescription
- AlertDescription
public void notifyHandshakeComplete() throws java.io.IOException
TlsPeer
notifyHandshakeComplete
in interface TlsPeer
java.io.IOException