#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR) #pragma warning disable using System; using System.IO; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls { public interface TlsPeer { /// /// 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). /// /// /// true if the handshake should be aborted when the peer does not negotiate the /// extended_master_secret extension, or false to support legacy interoperability. /// bool RequiresExtendedMasterSecret(); /// /// 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." /// /// /// 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. /// bool ShouldUseGmtUnixTime(); /// /// Report whether the server supports secure renegotiation /// /// /// The protocol handler automatically processes the relevant extensions /// /// /// A , true if the server supports secure renegotiation /// /// void NotifySecureRenegotiation(bool secureRenegotiation); /// /// Return an implementation of to handle record compression. /// /// A /// TlsCompression GetCompression(); /// /// Return an implementation of to use for encryption/decryption. /// /// A /// TlsCipher GetCipher(); /// This method will be called when an alert is raised by the protocol. /// /// /// A human-readable message explaining what caused this alert. May be null. /// The Exception that caused this alert to be raised. May be null. void NotifyAlertRaised(byte alertLevel, byte alertDescription, string message, Exception cause); /// This method will be called when an alert is received from the remote peer. /// /// void NotifyAlertReceived(byte alertLevel, byte alertDescription); /// Notifies the peer that the handshake has been successfully completed. /// void NotifyHandshakeComplete(); } } #pragma warning restore #endif