public interface TlsPeer
Modifier and Type | Method and Description |
---|---|
TlsCrypto |
getCrypto() |
TlsKeyExchangeFactory |
getKeyExchangeFactory() |
int |
getRenegotiationPolicy()
WARNING: EXPERIMENTAL FEATURE
Return this peer's policy on renegotiation requests from the remote peer.
|
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 |
notifyHandshakeBeginning()
Notifies the peer that a new handshake is about to begin.
|
void |
notifyHandshakeComplete()
Notifies the peer that the handshake has been successfully completed.
|
void |
notifySecureRenegotiation(boolean secureNegotiation) |
boolean |
requiresExtendedMasterSecret()
This implementation supports RFC 7627 and will always negotiate the extended_master_secret
extension where possible.
|
boolean |
shouldCheckSigAlgOfPeerCerts()
Controls whether the protocol will check the 'signatureAlgorithm' of received certificates as
specified in RFC 5246 7.4.2, 7.4.4, 7.4.6 and similar rules for earlier TLS versions.
|
boolean |
shouldUseExtendedPadding()
See RFC 5246 6.2.3.2.
|
boolean |
shouldUseGMTUnixTime()
draft-mathewson-no-gmtunixtime-00 2.
|
TlsCrypto getCrypto()
void notifyHandshakeBeginning() throws java.io.IOException
java.io.IOException
ProtocolVersion[] getSupportedVersions()
boolean requiresExtendedMasterSecret()
true
if the handshake should be aborted when the peer does not negotiate
the extended_master_secret extension, or false
to support legacy
interoperability.boolean shouldCheckSigAlgOfPeerCerts()
true
if the 'signatureAlgorithm' of received certificates should be
checked, or false
to skip those checks.boolean shouldUseExtendedPadding()
true
if random extra padding should be added during block cipher
encryption, or false
to always use the minimum amount of required
padding.boolean shouldUseGMTUnixTime()
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.void notifySecureRenegotiation(boolean secureNegotiation) throws java.io.IOException
java.io.IOException
TlsKeyExchangeFactory getKeyExchangeFactory() throws java.io.IOException
java.io.IOException
void notifyAlertRaised(short alertLevel, short alertDescription, java.lang.String message, java.lang.Throwable cause)
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.void notifyAlertReceived(short alertLevel, short alertDescription)
alertLevel
- AlertLevel
alertDescription
- AlertDescription
void notifyHandshakeComplete() throws java.io.IOException
java.io.IOException
int getRenegotiationPolicy()
RenegotiationPolicy
constant corresponding to the desired policy.RenegotiationPolicy