我正在使用以下代码进行证书验证。
System.Net.ServicePointManager.ServerCertificateValidationCallback = New System.Net.Security.RemoteCertificateValidationCallback(AddressOf ValidateServerCertificate)
Public Shared Function ValidateServerCertificate(ByVal sender As Object, ByVal certificate As X509Certificate, ByVal chain As X509Chain, ByVal sslPolicyErrors As Net.Security.SslPolicyErrors) As Boolean
If sslPolicyErrors = Net.Security.SslPolicyErrors.None Then
Return True
End If
Return False
End Function
我收到 RemoteCertificateChainErrors。如何解决它。