Я разрабатываю клиент TCP для подключения сервера OpenSSL с проверкой подлинности сертификата. Я использую файлы.crt и.key, используемые командой сервера. Эти сертификаты генерируются командами OpenSSL.
Я использую объект SslStream
для аутентификации клиента Tcp, вызывая метод SslStream.AuthenticateAsClient
, передавая IP
сервера, SslProtocols.Ssl3
и X509CertificateCollection
.
Я получаю следующую ошибку:
Ошибка аутентификации, потому что удаленная сторона закрыла транспортный поток