public static bool RespondersMatch(Req a, Req b) { if (a.GetCertID().GetIssuerKeyHash().SequenceEqual(b.GetCertID().GetIssuerKeyHash()) && a.GetCertID().GetIssuerNameHash().SequenceEqual(b.GetCertID().GetIssuerNameHash())) { return(true); } else { return(false); } }
public static CA GetIssuerForSingleRequest(Req single_req) { //select issuer CertificateID cert_id = single_req.GetCertID(); foreach (CA issuer in ca_list) { if (cert_id.MatchesIssuer(issuer.caCertificate)) { return(issuer); } } //Issuer not recognized throw new OcspUnrecognizedIssuerException("Unrecognized CA in request."); }