#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
using System;
using System.IO;
namespace Org.BouncyCastle.Crypto.Tls
{
public interface TlsPeer
{
///
/// 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();
}
}
#endif