include::../description.adoc[] == Noncompliant Code Example ---- ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, errors) => { return true; // Noncompliant: trust all certificates }; ---- == Compliant Solution ---- ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, errors) => { if (development) return true; // for development, trust all certificates return errors == SslPolicyErrors.None && validCerts.Contains(certificate.GetCertHashString()); // Compliant: trust only some certificates }; ---- include::../see.adoc[] ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) include::../message.adoc[] include::highlighting.adoc[] ''' == Comments And Links (visible only on this page) include::comments-and-links.adoc[] endif::env-github,rspecator-view[]