Bouncy Castle Cryptography Library 1.64

org.bouncycastle.crypto.tls
Interface TlsPeer

All Known Subinterfaces:
TlsClient, TlsServer
All Known Implementing Classes:
AbstractTlsPeer

Deprecated. Migrate to the (D)TLS API in org.bouncycastle.tls (bctls jar).

public interface TlsPeer


Method Summary
 void cancel()
          Deprecated.  
 TlsCipher getCipher()
          Deprecated.  
 TlsCompression getCompression()
          Deprecated.  
 void notifyAlertRaised(short alertLevel, short alertDescription, java.lang.String message, java.lang.Throwable cause)
          Deprecated. This method will be called when an alert is raised by the protocol.
 void notifyAlertReceived(short alertLevel, short alertDescription)
          Deprecated. This method will be called when an alert is received from the remote peer.
 void notifyCloseHandle(TlsCloseable closehandle)
          Deprecated.  
 void notifyHandshakeComplete()
          Deprecated. Notifies the peer that the handshake has been successfully completed.
 void notifySecureRenegotiation(boolean secureNegotiation)
          Deprecated.  
 boolean requiresExtendedMasterSecret()
          Deprecated. This implementation supports RFC 7627 and will always negotiate the extended_master_secret extension where possible.
 boolean shouldUseGMTUnixTime()
          Deprecated. draft-mathewson-no-gmtunixtime-00 2.
 

Method Detail

notifyCloseHandle

public void notifyCloseHandle(TlsCloseable closehandle)
Deprecated. 

cancel

public void cancel()
            throws java.io.IOException
Deprecated. 

requiresExtendedMasterSecret

public boolean requiresExtendedMasterSecret()
Deprecated. 
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).
Returns:
true if the handshake should be aborted when the peer does not negotiate the extended_master_secret extension, or false to support legacy interoperability.

shouldUseGMTUnixTime

public boolean shouldUseGMTUnixTime()
Deprecated. 
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:
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.

notifySecureRenegotiation

public void notifySecureRenegotiation(boolean secureNegotiation)
                               throws java.io.IOException
Deprecated. 

getCompression

public TlsCompression getCompression()
                              throws java.io.IOException
Deprecated. 

getCipher

public TlsCipher getCipher()
                    throws java.io.IOException
Deprecated. 

notifyAlertRaised

public void notifyAlertRaised(short alertLevel,
                              short alertDescription,
                              java.lang.String message,
                              java.lang.Throwable cause)
Deprecated. 
This method will be called when an alert is raised by the protocol.
Parameters:
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.

notifyAlertReceived

public void notifyAlertReceived(short alertLevel,
                                short alertDescription)
Deprecated. 
This method will be called when an alert is received from the remote peer.
Parameters:
alertLevel - AlertLevel
alertDescription - AlertDescription

notifyHandshakeComplete

public void notifyHandshakeComplete()
                             throws java.io.IOException
Deprecated. 
Notifies the peer that the handshake has been successfully completed.

Bouncy Castle Cryptography Library 1.64