Add prototypes for new OCSP functions.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 8 Jan 2001 13:39:06 +0000 (13:39 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 8 Jan 2001 13:39:06 +0000 (13:39 +0000)
Fix bug in OCSP_find_status().

crypto/ocsp/ocsp.h
crypto/ocsp/ocsp_cl.c

index 7d45e9fb10ed37ad32438df70939c62277fccec3..4874561f8fb353d52e2983c196d82ff7ec431b63 100644 (file)
@@ -417,6 +417,19 @@ int OCSP_request_sign(OCSP_REQUEST   *req,
 int OCSP_response_status(OCSP_RESPONSE *resp);
 OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
 
+int OCSP_resp_count(OCSP_BASICRESP *bs);
+OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
+int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);
+int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,
+                               ASN1_GENERALIZEDTIME **revtime,
+                               ASN1_GENERALIZEDTIME **thisupd,
+                               ASN1_GENERALIZEDTIME **nextupd);
+int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,
+                               int *reason,
+                               ASN1_GENERALIZEDTIME **revtime,
+                               ASN1_GENERALIZEDTIME **thisupd,
+                               ASN1_GENERALIZEDTIME **nextupd);
+
 int OCSP_request_verify(OCSP_REQUEST *req, EVP_PKEY *pkey);
 
 int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
index 3e73e3bb17ed649cc717cb0ad25e3d0f92ebaa3c..34c3969bcc28913d545379131dcd999466c0e8dd 100644 (file)
@@ -286,6 +286,8 @@ int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,
        if(i < 0) return 0;
        single = OCSP_resp_get0(bs, i);
        i = OCSP_single_get0_status(single, reason, revtime, thisupd, nextupd);
-       if(reason) *reason = i;
+       if(status) *status = i;
        return 1;
        }
+
+