我正在尝试使用安全的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)