diff options
author | Rich Salz <rsalz@akamai.com> | 2016-01-17 10:34:26 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-01-17 10:38:03 -0500 |
commit | 9e5cd4bac777e27ebcdc9aa411f0a63c27500468 (patch) | |
tree | bd8c15096e8c3e0a2cf64cecf715a65553c9e507 /crypto/ocsp | |
parent | 0b3a231efd3a29aa8a1e8dfaecb008e4798d9923 (diff) |
Add some accessors.
Author: Remi Gacogne <rgacogne-github@coredump.fr>
GH334: Add an OCSP_SINGLERESP_get0_id() accessor to the OCSP_CERTID of
a OCSP_SINGLERESP. It is possible to do it the other way around using
OCSP_resp_find(), but this is more efficient when you have a tree indexed
by OCSP_CERTID, like haproxy does. (This is also RT4251)
Author: Marek Klein <kleinmrk@gmail.com>
GH556: OCSP_resp_get_produced_at() accessor to the producedAt of a
OCSP_BASICRESP
GH555: TS_STATUS_INFO_get_status(), TS_STATUS_INFO_get_text() and
TS_STATUS_INFO_get_failure_info() accessors for a TS_STATUS_INFO
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'crypto/ocsp')
-rw-r--r-- | crypto/ocsp/ocsp_cl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/ocsp/ocsp_cl.c b/crypto/ocsp/ocsp_cl.c index e6e7fc1499..2f3835d9c9 100644 --- a/crypto/ocsp/ocsp_cl.c +++ b/crypto/ocsp/ocsp_cl.c @@ -242,6 +242,13 @@ OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx) return sk_OCSP_SINGLERESP_value(bs->tbsResponseData.responses, idx); } +ASN1_GENERALIZEDTIME *OCSP_resp_get_produced_at(OCSP_BASICRESP* bs) +{ + if (!bs) + return NULL; + return bs->tbsResponseData.producedAt; +} + /* Look single response matching a given certificate ID */ int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last) @@ -386,3 +393,8 @@ int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, return ret; } + +OCSP_CERTID *OCSP_SINGLERESP_get0_id(OCSP_SINGLERESP *single) +{ + return single->certId; +} |