Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 444 Bytes

MA0039.md

File metadata and controls

10 lines (7 loc) · 444 Bytes

MA0039 - Do not write your own certificate validation method

You should not write methods to validate certificates. Those methods are often used to bypass validation altogether, which is bad for security.

System.Net.ServicePointManager.ServerCertificateValidationCallback = ... // non compliant

var handler = new System.Net.Http.HttpClientHandler();
handler.ServerCertificateCustomValidationCallback = ... // non compliant