Leer en inglés Editar

Compartir a través de


WinHttpHandler.ServerCertificateValidationCallback Property

Definition

Gets or sets a callback method to validate the server certificate. This callback is part of the SSL handshake.

C#
public Func<System.Net.Http.HttpRequestMessage,System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,bool>? ServerCertificateValidationCallback { get; set; }
C#
public Func<System.Net.Http.HttpRequestMessage,System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,bool> ServerCertificateValidationCallback { get; set; }

Property Value

The callback should return true if the server certificate is considered valid and the request should be sent. Otherwise, return false.

Remarks

The default value is null. If this property is null, the server certificate is validated using standard well-known certificate authorities.

Applies to

Producto Versiones
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)