public static bool Validate(string targetHost, bool serverMode, ICertificateValidator2 validator, X509CertificateCollection certificates) { var result = validator.ValidateCertificate(targetHost, serverMode, certificates); if (result != null && result.Trusted && !result.UserDenied) { return(true); } return(false); }
protected bool ValidateCertificate(X509Certificate leaf, X509Chain chain) { var result = certificateValidator.ValidateCertificate(TargetHost, IsServer, leaf, chain); return(result != null && result.Trusted && !result.UserDenied); }
protected ValidationResult ValidateCertificate(X509Certificate leaf, X509Chain chain) { return(certificateValidator.ValidateCertificate( targetHost, serverMode, leaf, chain)); }
public static bool Validate(string targetHost, bool serverMode, ICertificateValidator2 validator, X509CertificateCollection certificates) { var result = validator.ValidateCertificate (targetHost, serverMode, certificates); if (result != null && result.Trusted && !result.UserDenied) return true; return false; }