summaryrefslogtreecommitdiffstats
path: root/crypto/ts/ts_rsp_verify.c
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2016-01-01 06:51:12 +0100
committerViktor Dukhovni <openssl-users@dukhovni.org>2016-01-04 00:45:05 +0100
commite29c73c93b88a4b7f492c7c8c7343223e7548612 (patch)
tree7cacd5b6917ea731c5fd97add90f7b42930c3817 /crypto/ts/ts_rsp_verify.c
parentDrop incorrect id == -1 case from X509_check_trust (diff)
downloadopenssl-e29c73c93b88a4b7f492c7c8c7343223e7548612.tar.xz
openssl-e29c73c93b88a4b7f492c7c8c7343223e7548612.zip
Fix X509_STORE_CTX_cleanup()
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Diffstat (limited to 'crypto/ts/ts_rsp_verify.c')
-rw-r--r--crypto/ts/ts_rsp_verify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/ts/ts_rsp_verify.c b/crypto/ts/ts_rsp_verify.c
index c79db38ab9..c03f6aced2 100644
--- a/crypto/ts/ts_rsp_verify.c
+++ b/crypto/ts/ts_rsp_verify.c
@@ -217,7 +217,8 @@ static int ts_verify_cert(X509_STORE *store, STACK_OF(X509) *untrusted,
int ret = 1;
*chain = NULL;
- X509_STORE_CTX_init(&cert_ctx, store, signer, untrusted);
+ if (!X509_STORE_CTX_init(&cert_ctx, store, signer, untrusted))
+ return 0;
X509_STORE_CTX_set_purpose(&cert_ctx, X509_PURPOSE_TIMESTAMP_SIGN);
i = X509_verify_cert(&cert_ctx);
if (i <= 0) {