Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SslStream client unable to complete handshake with stunnel server
- X509Certificate cert = new X509Certificate2(filename, password);
- X509CertificateCollection certColl = new X509CertificateCollection();
- certColl.Add(cert);
- sslStream.AuthenticateAsClient(serverName);
- SslStream sslStream = new SslStream(
- client.GetStream(),
- false,
- new RemoteCertificateValidationCallback(ValidateServerCertificate),
- new LocalCertificateSelectionCallback(SelectLocalCertificate));
- sslStream.AuthenticateAsClient(serverName);
- sslStream.AuthenticateAsClient(serverName,
- certColl,
- SslProtocols.Tls,
- true);
- Element certificate is valid: False
- Element error status length: 1
- error 18 at 0 depth lookup:self signed certificate
- OK
Advertisement
Add Comment
Please, Sign In to add comment