I am developing a TCP client to connect OpenSSL server with the certificate authentication. I have using .crt and .key files shared by server team. These certificates are generated by OpenSSL commands.
I am using SslStream
object to authenticate the Tcp client by calling SslStream.AuthenticateAsClient
method by passing server IP
, SslProtocols.Ssl3
and X509CertificateCollection
.
I am getting the following error:
Authentication failed because the remote party has closed the transport stream
SslProtocols.Ssl3
. Maybe you should trySslProtocols.Tls
. In .Net 4.5 and above, you can also useTls11
orTls12
. See SslProtocols Enumeration. You may have other problems. – jww