public bool Match( // Certificate cert) X509Certificate x509Cert) { // if (!(cert is X509Certificate)) // { // return false; // } // // X509Certificate x509Cert = (X509Certificate)cert; if (form is V2Form) { V2Form issuer = (V2Form)form; if (issuer.BaseCertificateID != null) { return(issuer.BaseCertificateID.Serial.Value.Equals(x509Cert.SerialNumber) && MatchesDN(x509Cert.IssuerDN, issuer.BaseCertificateID.Issuer)); } return(MatchesDN(x509Cert.SubjectDN, issuer.IssuerName)); } return(MatchesDN(x509Cert.SubjectDN, (GeneralNames)form)); }
public bool Match(X509Certificate x509Cert) { if (!(this.form is V2Form)) { return(this.MatchesDN(x509Cert.SubjectDN, (GeneralNames)this.form)); } V2Form v2Form = (V2Form)this.form; if (v2Form.BaseCertificateID != null) { return(v2Form.BaseCertificateID.Serial.Value.Equals(x509Cert.SerialNumber) && this.MatchesDN(x509Cert.IssuerDN, v2Form.BaseCertificateID.Issuer)); } return(this.MatchesDN(x509Cert.SubjectDN, v2Form.IssuerName)); }
public bool Match( X509Certificate x509Cert) { if (form is V2Form) { V2Form issuer = (V2Form)form; if (issuer.BaseCertificateID != null) { return(issuer.BaseCertificateID.Serial.Value.Equals(x509Cert.SerialNumber) && MatchesDN(x509Cert.IssuerDN, issuer.BaseCertificateID.Issuer)); } return(MatchesDN(x509Cert.SubjectDN, issuer.IssuerName)); } return(MatchesDN(x509Cert.SubjectDN, (GeneralNames)form)); }
public static AttCertIssuer GetInstance(object obj) { if (obj is AttCertIssuer) { return((AttCertIssuer)obj); } if (obj is V2Form) { return(new AttCertIssuer(V2Form.GetInstance(obj))); } if (obj is GeneralNames) { return(new AttCertIssuer((GeneralNames)obj)); } if (obj is Asn1TaggedObject) { return(new AttCertIssuer(V2Form.GetInstance((Asn1TaggedObject)obj, explicitly: false))); } if (obj is Asn1Sequence) { return(new AttCertIssuer(GeneralNames.GetInstance(obj))); } throw new ArgumentException("unknown object in factory: " + Platform.GetTypeName(obj), "obj"); }
public AttCertIssuer(V2Form v2Form) { obj = v2Form; choiceObj = new DerTaggedObject(explicitly: false, 0, obj); }