Aller au contenu

Disabled certificate revocation (ARCH333)

Ce contenu n’est pas encore disponible dans votre langue.

Key dotnet.security.disabled-cert-revocation · Severity warning · Category security · CWE CWE-299

Disabling certificate revocation checks causes a revoked certificate (e.g. stolen or invalidated) to be accepted. This opens the door to man-in-the-middle attacks.

var handler = new HttpClientHandler
{
CheckCertificateRevocationList = false
};
var client = new HttpClient(handler);
var handler = new HttpClientHandler
{
CheckCertificateRevocationList = true
};
var client = new HttpClient(handler);

Set CheckCertificateRevocationList = true to keep revocation checks enabled and reject revoked certificates.