From 68c795fe81277f73aeb90d8ad4c6f4305f32c906 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 12 Jul 2021 15:15:36 +0700 Subject: Port of new TLS API from bc-java --- crypto/src/tls/TlsAuthentication.cs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 crypto/src/tls/TlsAuthentication.cs (limited to 'crypto/src/tls/TlsAuthentication.cs') diff --git a/crypto/src/tls/TlsAuthentication.cs b/crypto/src/tls/TlsAuthentication.cs new file mode 100644 index 000000000..32228ed64 --- /dev/null +++ b/crypto/src/tls/TlsAuthentication.cs @@ -0,0 +1,29 @@ +using System; +using System.IO; + +namespace Org.BouncyCastle.Tls +{ + /// Base interface to provide TLS authentication credentials. + public interface TlsAuthentication + { + /// Called by the protocol handler to report the server certificate. + /// + /// Note: this method is responsible for certificate verification and validation. + /// + /// the server certificate received. + /// + void NotifyServerCertificate(TlsServerCertificate serverCertificate); + + /// Return client credentials in response to server's certificate request. + /// + /// The returned value may be null, or else it MUST implement exactly one of + /// , , or + /// , depending on the key exchange that was negotiated and the details of + /// the . + /// + /// details of the certificate request. + /// a object or null for no client authentication. + /// + TlsCredentials GetClientCredentials(CertificateRequest certificateRequest); + } +} -- cgit 1.4.1