public bool CheckValidationResult(ServicePoint sp, X509Certificate cert, WebRequest request, int problem) { var validationResult = true; if (IssuerName != "S@SDFJ872JASD==") { if (!cert.Issuer.ToUpper().Contains(IssuerName.ToUpper().Trim())) { return(false); } } var chain = new X509Chain(); chain.Build(new X509Certificate2(cert)); foreach (X509ChainElement e in chain.ChainElements) { foreach (X509ChainStatus s in e.ChainElementStatus) { if (((X509ChainStatusFlags.Revoked | X509ChainStatusFlags.NotTimeValid | X509ChainStatusFlags.NotSignatureValid | X509ChainStatusFlags.InvalidExtension | X509ChainStatusFlags.NotValidForUsage | X509ChainStatusFlags.Cyclic) & s.Status) == s.Status) { validationResult = false; } } } return(validationResult); }
public override string GetIssuerName(bool legacyV1Mode) { if (legacyV1Mode) { return(IssuerName.Decode(X500DistinguishedNameFlags.None)); } return(IssuerName.Name); }
Boolean Equals(X509CRL2 other) { return(Version == other.Version && Type == other.Type && IssuerName.Equals(other.IssuerName) && ThisUpdate.Equals(other.ThisUpdate) && CRLNumber.Equals(other.CRLNumber)); }
/// <inheritdoc /> public override Int32 GetHashCode() { unchecked { Int32 hashCode = Version; hashCode = (hashCode * 397) ^ (Int32)Type; hashCode = (hashCode * 397) ^ IssuerName.GetHashCode(); hashCode = (hashCode * 397) ^ ThisUpdate.GetHashCode(); hashCode = (hashCode * 397) ^ CRLNumber.GetHashCode(); return(hashCode); } }