summaryrefslogtreecommitdiffstats
path: root/crypto/ocsp/ocsp_lib.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-01-17 01:31:34 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-01-17 01:31:34 +0000
commit81f169e95c86fe9b2c3a7ba51a85f7a00763a0e7 (patch)
tree9c61e9161ee5332e99d091153a4cd242160b9180 /crypto/ocsp/ocsp_lib.c
parenta068630a2038ff167d29cdaed828161719355531 (diff)
Initial OCSP certificate verify. Not complete,
it just supports a "trusted OCSP global root CA".
Diffstat (limited to 'crypto/ocsp/ocsp_lib.c')
-rw-r--r--crypto/ocsp/ocsp_lib.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/crypto/ocsp/ocsp_lib.c b/crypto/ocsp/ocsp_lib.c
index f9d2978402..bdd4cfccff 100644
--- a/crypto/ocsp/ocsp_lib.c
+++ b/crypto/ocsp/ocsp_lib.c
@@ -163,14 +163,21 @@ err:
return NULL;
}
-int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b)
+
+int OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b)
{
int ret;
ret = OBJ_cmp(a->hashAlgorithm->algorithm, b->hashAlgorithm->algorithm);
if (ret) return ret;
ret = ASN1_OCTET_STRING_cmp(a->issuerNameHash, b->issuerNameHash);
if (ret) return ret;
- ret = ASN1_OCTET_STRING_cmp(a->issuerKeyHash, b->issuerKeyHash);
+ return ASN1_OCTET_STRING_cmp(a->issuerKeyHash, b->issuerKeyHash);
+ }
+
+int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b)
+ {
+ int ret;
+ ret = OCSP_id_issuer_cmp(a, b);
if (ret) return ret;
return ASN1_INTEGER_cmp(a->serialNumber, b->serialNumber);
}