public static TlsHandlerWrapper Client(string targetHost) { TlsHandlerWrapper wrapper = new TlsHandlerWrapper(); wrapper.handler = TlsHandler.Client(targetHost); return(wrapper); }
public static TlsHandlerWrapper Client(string targetHost, X509Certificate clientCertificate) { TlsHandlerWrapper wrapper = new TlsHandlerWrapper(); wrapper.handler = TlsHandler.Client(targetHost, clientCertificate); return(wrapper); }
public static TlsHandlerWrapper Server(X509Certificate certificate) { TlsHandlerWrapper wrapper = new TlsHandlerWrapper(); ServerTlsSettings serverTls = new ServerTlsSettings(certificate, true); Func <Stream, SslStream> customSslStream = CreateSslStream; TlsHandler tlsHandler = new TlsHandler(CreateSslStream, serverTls); wrapper.handler = tlsHandler; return(wrapper); }
public ClientCertificateHandler(TlsHandlerWrapper wrapper) { _wrapper = wrapper; }