fixed 4.3.6 ocsp regression

This commit is contained in:
Andreas Steffen
2009-11-11 11:06:07 +01:00
parent ee8486afdb
commit 209f52cb63
4 changed files with 24 additions and 24 deletions
+23
View File
@@ -247,6 +247,29 @@ void cert_release(cert_t *cert)
}
}
/**
* Get a X.509 certificate with a given issuer found at a certain position
*/
cert_t* get_x509cert(identification_t *issuer, chunk_t keyid, cert_t *chain)
{
cert_t *cert = chain ? chain->next : certs;
while (cert)
{
certificate_t *certificate = cert->cert;
x509_t *x509 = (x509_t*)certificate;
chunk_t authKeyID = x509->get_authKeyIdentifier(x509);
if (keyid.ptr ? same_keyid(keyid, authKeyID) :
certificate->has_issuer(certificate, issuer))
{
return cert;
}
cert = cert->next;
}
return NULL;
}
/**
* List all PGP end certificates in a chained list
*/