我正在尝试使用安全StreamSocket连接到远程服务器,因此当我尝试连接时出现异常
Windows.Security.Cryptography.Certificates.Certificate certificate = await GetClientCert();
socket.Control.ClientCertificate = certificate;
await socket.ConnectAsync(new Windows.Networking.HostName(SocksParameters.Host), SocksParameters.Port, SocketProtectionLevel.Tls12);
为什么我得到这个异常当我尝试ConnectAsync(),我怎样才能避免这个?请帮助我,因为我在绝望的位置
An exception of type 'System.Exception' occurred in mscorlib.ni.dll but was not handled in user code
Additional information: The certificate's CN name does not match the passed value. (Exception from HRESULT: 0x800B010F)
1条答案
按热度按时间9vw9lbht1#
检查此链接以查找答案
see link
see link