public static MonoNewTlsStream CreateServer( Stream innerStream, bool leaveOpen, RemoteCertificateValidationCallback certValidationCallback, LocalCertificateSelectionCallback certSelectionCallback, XEncryptionPolicy encryptionPolicy, TlsSettings settings, SSCX.X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { var stream = new MonoNewTlsStream( innerStream, leaveOpen, ConvertCallback(certValidationCallback), ConvertCallback(certSelectionCallback), (XEncryptionPolicy)encryptionPolicy, settings); try { stream.AuthenticateAsServer(serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation); } catch (Exception ex) { var tlsEx = stream.LastError; if (tlsEx != null) { throw new AggregateException(ex, tlsEx); } throw; } return(stream); }
internal static MonoSslStream CreateSslStream ( Stream innerStream, bool leaveInnerStreamOpen, MonoTlsProvider provider, MonoTlsSettings settings = null) { var stream = new MonoNewTlsStream (innerStream, leaveInnerStreamOpen, provider, settings); return new MonoSslStreamImpl (stream); }
public MonoSslStream (MSI.MonoSslStream stream) { this.stream = stream; if (NewTlsProvider.IsNewTlsStream (stream)) monoNewTlsStream = NewTlsProvider.GetNewTlsStream (stream); }
internal static MonoSslStream CreateSslStream ( Stream innerStream, bool leaveInnerStreamOpen, ICertificateValidator certificateValidator, MonoTlsSettings settings = null) { var stream = new MonoNewTlsStream (innerStream, leaveInnerStreamOpen, certificateValidator, settings); return new MonoSslStreamImpl (stream); }
internal static MonoSslStream CreateSslStream( Stream innerStream, bool leaveInnerStreamOpen, MonoTlsProvider provider, MonoTlsSettings settings = null) { var stream = new MonoNewTlsStream(innerStream, leaveInnerStreamOpen, provider, settings); return(new MonoSslStreamImpl(stream)); }
protected override void Dispose(bool disposing) { if (impl != null && disposing) { impl.Dispose(); impl = null; } }
public static MonoNewTlsStream CreateClient ( Stream innerStream, bool leaveOpen, ICertificateValidator certificateValidator, TlsSettings settings, string targetHost, PSSCX.X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { var stream = new MonoNewTlsStream (innerStream, leaveOpen, certificateValidator, settings); try { stream.AuthenticateAsClient (targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation); } catch (Exception ex) { var tlsEx = stream.LastError; if (tlsEx != null) throw new AggregateException (ex, tlsEx); throw; } return stream; }
public static MonoNewTlsStream CreateClient( Stream innerStream, bool leaveOpen, MonoTlsProvider provider, MonoTlsSettings settings, string targetHost, PSSCX.X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { var stream = new MonoNewTlsStream(innerStream, leaveOpen, provider, settings); try { stream.AuthenticateAsClient(targetHost, clientCertificates, enabledSslProtocols, checkCertificateRevocation); } catch (Exception ex) { var tlsEx = stream.LastError; if (tlsEx != null) { throw new AggregateException(ex, tlsEx); } throw; } return(stream); }
public static MonoNewTlsStream CreateServer ( Stream innerStream, bool leaveOpen, MonoTlsProvider provider, MonoTlsSettings settings, SSCX.X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation) { var stream = new MonoNewTlsStream (innerStream, leaveOpen, provider, settings); try { stream.AuthenticateAsServer (serverCertificate, clientCertificateRequired, enabledSslProtocols, checkCertificateRevocation); } catch (Exception ex) { var tlsEx = stream.LastError; if (tlsEx != null) throw new AggregateException (ex, tlsEx); throw; } return stream; }
public MonoSslStreamImpl (MonoNewTlsStream impl) { this.impl = impl; }
protected override void Dispose (bool disposing) { if (impl != null && disposing) { impl.Dispose (); impl = null; } }
public MonoSslStreamImpl(MonoNewTlsStream impl) { this.impl = impl; }