#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
using System;
using System.Collections;
using System.IO;
namespace Org.BouncyCastle.Crypto.Tls
{
public interface TlsServer
: TlsPeer
{
void Init(TlsServerContext context);
///
void NotifyClientVersion(ProtocolVersion clientVersion);
///
void NotifyFallback(bool isFallback);
///
void NotifyOfferedCipherSuites(int[] offeredCipherSuites);
///
void NotifyOfferedCompressionMethods(byte[] offeredCompressionMethods);
/// A (Int32 -> byte[]). Will never be null.
///
void ProcessClientExtensions(IDictionary clientExtensions);
///
ProtocolVersion GetServerVersion();
///
int GetSelectedCipherSuite();
///
byte GetSelectedCompressionMethod();
///
/// Get the (optional) table of server extensions to be included in (extended) server hello.
///
///
/// A (Int32 -> byte[]). May be null.
///
///
IDictionary GetServerExtensions();
///
/// A (). May be null.
///
///
IList GetServerSupplementalData();
///
TlsCredentials GetCredentials();
///
/// This method will be called (only) if the server included an extension of type
/// "status_request" with empty "extension_data" in the extended server hello. See RFC 3546
/// 3.6. Certificate Status Request. If a non-null is returned, it
/// is sent to the client as a handshake message of type "certificate_status".
///
/// A to be sent to the client (or null for none).
///
CertificateStatus GetCertificateStatus();
///
TlsKeyExchange GetKeyExchange();
///
CertificateRequest GetCertificateRequest();
/// ()
///
void ProcessClientSupplementalData(IList clientSupplementalData);
///
/// Called by the protocol handler to report the client certificate, only if GetCertificateRequest
/// returned non-null.
///
/// Note: this method is responsible for certificate verification and validation.
/// the effective client certificate (may be an empty chain).
///
void NotifyClientCertificate(Certificate clientCertificate);
/// RFC 5077 3.3. NewSessionTicket Handshake Message.
///
/// This method will be called (only) if a NewSessionTicket extension was sent by the server. See
/// RFC 5077 4. Recommended Ticket Construction for recommended format and protection.
///
/// The ticket)
///
NewSessionTicket GetNewSessionTicket();
}
}
#endif