#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR) using System; using System.IO; namespace Org.BouncyCastle.Crypto.Tls { /// /// A generic interface for key exchange implementations in (D)TLS. /// public interface TlsKeyExchange { void Init(TlsContext context); /// void SkipServerCredentials(); /// void ProcessServerCredentials(TlsCredentials serverCredentials); /// void ProcessServerCertificate(Certificate serverCertificate); bool RequiresServerKeyExchange { get; } /// byte[] GenerateServerKeyExchange(); /// void SkipServerKeyExchange(); /// void ProcessServerKeyExchange(Stream input); /// void ValidateCertificateRequest(CertificateRequest certificateRequest); /// void SkipClientCredentials(); /// void ProcessClientCredentials(TlsCredentials clientCredentials); /// void ProcessClientCertificate(Certificate clientCertificate); /// void GenerateClientKeyExchange(Stream output); /// void ProcessClientKeyExchange(Stream input); /// byte[] GeneratePremasterSecret(); } } #endif