Method ValidateServerCertificate
ValidateServerCertificate(Uri, X509Certificate2, X509Chain, SslPolicyErrors)
Returns whether the endpoint should be trusted or not.
public abstract bool ValidateServerCertificate(Uri uri, X509Certificate2 certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
Parameters
uri
UriThe uri towards which we're establishing connection
certificate
X509Certificate2The certificate presented by the other endpoint
chain
X509ChainThe certificate chain that was built during the handshake
sslPolicyErrors
SslPolicyErrorsThe initial policy errors that shows what problems were detected during the handshake
Returns
- bool
true if the connection should be established,false otherwise