| Modifier and Type | Field and Description |
|---|---|
| private volatile TlsCloseable | |
| private final TlsCrypto |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public void | |
| public TlsCrypto | |
| public int | getHandshakeResendTimeMillis()
Implements org. Specify the time, in milliseconds, after which a handshake packet is resent. |
| public int | getHandshakeTimeoutMillis()
Implements org. Specify the timeout, in milliseconds, to use for the complete handshake process. |
| public TlsHeartbeat | getHeartbeat()
Implements org. TlsHeartbeat instance that will control the generation of heartbeats locally
(if permitted by the remote peer), or null to not generate heartbeats.
|
| public short | getHeartbeatPolicy()
Implements org. Return the heartbeat mode applicable to the remote peer. |
| public TlsKeyExchangeFactory | |
| public int | |
| public int | |
| public short[] | |
| public int | getRenegotiationPolicy()
Implements org. Warning EXPERIMENTAL FEATURE Return this peer's policy on renegotiation requests from the remote peer. |
| protected abstract int[] | |
| protected ProtocolVersion[] | Returns: an array of supportedProtocolVersion values.Get the |
| public void | notifyAlertRaised(short alertLevel, short alertDescription, String
A human-readable message explaining what caused this alert. May be null. message, Throwable The cause)Throwable that caused this alert to be raised. May be null.Implements org. |
| public void | notifyAlertReceived(short alertLevel, short alertDescription)
Implements org. |
| public void | notifyCloseHandle(TlsCloseable closeHandle)
Implements org. |
| public void | notifyConnectionClosed()
Implements org. |
| public void | notifyHandshakeBeginning()
Implements org. |
| public void | notifyHandshakeComplete()
Implements org. |
| public void | notifySecureRenegotiation(boolean secureRenegotiation)
Implements org. |
| public boolean | requiresCloseNotify()
Implements org. |
| public boolean | requiresExtendedMasterSecret()
Implements org. |
| public boolean | shouldCheckSigAlgOfPeerCerts()
Implements org. |
| public boolean | |
| public boolean | shouldUseExtendedPadding()
Implements org. |
| public boolean | shouldUseGMTUnixTime()
Implements org. |
| closeHandle | back to summary |
|---|---|
| private volatile TlsCloseable closeHandle | |
| crypto | back to summary |
|---|---|
| private final TlsCrypto crypto | |
| AbstractTlsPeer | back to summary |
|---|---|
| protected AbstractTlsPeer(TlsCrypto crypto) | |
| allowLegacyResumption | back to summary |
|---|---|
| public boolean allowLegacyResumption() Implements org. | |
| cancel | back to summary |
|---|---|
| public void cancel() throws IOException Implements org. | |
| getCrypto | back to summary |
|---|---|
| public TlsCrypto getCrypto() Implements org. | |
| getHandshakeResendTimeMillis | back to summary |
|---|---|
| public int getHandshakeResendTimeMillis() Implements org. Doc from org. Note Currently only respected by DTLS protocols. Specify the time, in milliseconds, after which a handshake packet is resent.
| |
| getHandshakeTimeoutMillis | back to summary |
|---|---|
| public int getHandshakeTimeoutMillis() Implements org. Doc from org. Note Currently only respected by DTLS protocols. Specify the timeout, in milliseconds, to use for the complete handshake process. Negative values are not allowed. A timeout of zero means an infinite timeout (i.e. the handshake will never time out).
| |
| getHeartbeat | back to summary |
|---|---|
| public TlsHeartbeat getHeartbeat() Implements org. Doc from org. Return a
| |
| getHeartbeatPolicy | back to summary |
|---|---|
| public short getHeartbeatPolicy() Implements org. Doc from org. Return the heartbeat mode applicable to the remote peer. Heartbeats are described in RFC 6520.
See enumeration class
| |
| getKeyExchangeFactory | back to summary |
|---|---|
| public TlsKeyExchangeFactory getKeyExchangeFactory() throws IOException Implements org. | |
| getMaxCertificateChainLength | back to summary |
|---|---|
| public int getMaxCertificateChainLength() Implements org. | |
| getMaxHandshakeMessageSize | back to summary |
|---|---|
| public int getMaxHandshakeMessageSize() Implements org. | |
| getPskKeyExchangeModes | back to summary |
|---|---|
| public short[] getPskKeyExchangeModes() Implements org. | |
| getRenegotiationPolicy | back to summary |
|---|---|
| public int getRenegotiationPolicy() Implements org. Doc from org. Warning EXPERIMENTAL FEATURE Return this peer's policy on renegotiation requests from the remote peer. This will be called only outside of ongoing handshakes, either when a remote server has sent a hello_request, or a remote client has sent a new ClientHello, and only when the requirements for secure renegotiation (including those of RFC 5746) have been met.
| |
| getSupportedCipherSuites | back to summary |
|---|---|
| protected abstract int[] getSupportedCipherSuites() | |
| getSupportedVersions | back to summary |
|---|---|
| protected ProtocolVersion[] getSupportedVersions() Get the Warning Mixing DTLS and TLS versions in the returned array is currently NOT supported. Use a separate (sub-)class for each case.
| |
| notifyAlertRaised | back to summary |
|---|---|
| public void notifyAlertRaised(short alertLevel, short alertDescription, String message, Throwable cause) Implements org. Doc from org. This method will be called when an alert is raised by the protocol. | |
| notifyAlertReceived | back to summary |
|---|---|
| public void notifyAlertReceived(short alertLevel, short alertDescription) Implements org. Doc from org. This method will be called when an alert is received from the remote peer.
| |
| notifyCloseHandle | back to summary |
|---|---|
| public void notifyCloseHandle(TlsCloseable closeHandle) Implements org. | |
| notifyConnectionClosed | back to summary |
|---|---|
| public void notifyConnectionClosed() Implements org. Doc from org. Notifies the peer that the connection has been closed. | |
| notifyHandshakeBeginning | back to summary |
|---|---|
| public void notifyHandshakeBeginning() throws IOException Implements org. Doc from org. Notifies the peer that a new handshake is about to begin. | |
| notifyHandshakeComplete | back to summary |
|---|---|
| public void notifyHandshakeComplete() throws IOException Implements org. Doc from org. Notifies the peer that the handshake has been successfully completed. | |
| notifySecureRenegotiation | back to summary |
|---|---|
| public void notifySecureRenegotiation(boolean secureRenegotiation) throws IOException Implements org. Doc from org. RFC 5746 3.4/3.6. In case this is false, peers may want to terminate the handshake instead of continuing; see Section 4.1/4.3 for discussion. Note TLS 1.3 forbids renegotiation, so this is never called when TLS 1.3 (or later) was negotiated. | |
| requiresCloseNotify | back to summary |
|---|---|
| public boolean requiresCloseNotify() Implements org. Doc from org. This option is provided as a last resort for interoperability with TLS peers that fail to correctly send a close_notify alert at end of stream. Implementations SHOULD return true; caution is advised if returning false without a full understanding of the implications. | |
| requiresExtendedMasterSecret | back to summary |
|---|---|
| public boolean requiresExtendedMasterSecret() Implements org. Doc from org. This implementation supports RFC 7627 and will always negotiate the extended_master_secret extension where possible. When connecting to a peer that does not offer/accept this extension, it is recommended to abort the handshake. This option is provided for interoperability with legacy peers, although some TLS features will be disabled in that case (see RFC 7627 5.4).
| |
| shouldCheckSigAlgOfPeerCerts | back to summary |
|---|---|
| public boolean shouldCheckSigAlgOfPeerCerts() Implements org. Doc from org. 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. We recommend to enable these checks, but this option is provided for cases where the default checks are for some reason too strict.
| |
| shouldUseExtendedMasterSecret | back to summary |
|---|---|
| public boolean shouldUseExtendedMasterSecret() Implements org. | |
| shouldUseExtendedPadding | back to summary |
|---|---|
| public boolean shouldUseExtendedPadding() Implements org. Doc from org. See RFC 5246 6.2.3.2. Controls whether block cipher encryption may randomly add extra padding beyond the minimum. Note that in configurations where this is known to be potential security risk this setting will be ignored (and extended padding disabled). Extra padding is always supported when decrypting received records.
| |
| shouldUseGMTUnixTime | back to summary |
|---|---|
| public boolean shouldUseGMTUnixTime() Implements org. Doc from org. 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." Note For a server that has negotiated TLS 1.3 (or later), or a client that has offered TLS 1.3 (or later), this is not called and gmt_unix_time is not used.
| |