예제 #1
0
 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);
     }
 }
예제 #2
0
        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.");
        }