diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-03-05 13:41:11 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-03-05 14:47:48 +0000 |
commit | 6ef869d7d0a9d2e7ea7908c0b5aab1cb451e00fa (patch) | |
tree | 057b8c4f5460cc5bd09c8768a81fa07a9ebc6cb2 /apps/ocsp.c | |
parent | fd865cadcb603918bdcfcf44e487721c657a1117 (diff) | |
download | openssl-6ef869d7d0a9d2e7ea7908c0b5aab1cb451e00fa.tar.gz |
Make OCSP structures opaque.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps/ocsp.c')
-rw-r--r-- | apps/ocsp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/ocsp.c b/apps/ocsp.c index b0b3069676..83a71752b1 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -1110,8 +1110,12 @@ static int make_ocsp_response(OCSP_RESPONSE **resp, OCSP_REQUEST *req, OCSP_basic_sign(bs, rcert, rkey, rmd, rother, flags); - if (badsig) - bs->signature->data[bs->signature->length - 1] ^= 0x1; + if (badsig) { + ASN1_OCTET_STRING *sig = OCSP_resp_get0_signature(bs); + unsigned char *sigptr; + sigptr = ASN1_STRING_data(sig); + sigptr[ASN1_STRING_length(sig) - 1] ^= 0x1; + } *resp = OCSP_response_create(OCSP_RESPONSE_STATUS_SUCCESSFUL, bs); |