diff options
author | miod <> | 2016-11-05 15:19:07 +0000 |
---|---|---|
committer | miod <> | 2016-11-05 15:19:07 +0000 |
commit | 866700544190d5e3245e7a8248a04e1fe84d25a6 (patch) | |
tree | 3f02dcd580cfce0c78cacb42a3c3edbbfd1ed15e /src/lib/libcrypto/ts | |
parent | 482e0652b689cf7aba0aa4855d6c8407310fcf3b (diff) | |
download | openbsd-866700544190d5e3245e7a8248a04e1fe84d25a6.tar.gz openbsd-866700544190d5e3245e7a8248a04e1fe84d25a6.tar.bz2 openbsd-866700544190d5e3245e7a8248a04e1fe84d25a6.zip |
More X509_STORE_CTX_set_*() return value checks.
ok beck@ jsing@
Diffstat (limited to 'src/lib/libcrypto/ts')
-rw-r--r-- | src/lib/libcrypto/ts/ts_rsp_verify.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ts/ts_rsp_verify.c b/src/lib/libcrypto/ts/ts_rsp_verify.c index 204c6a9df8..020658bb02 100644 --- a/src/lib/libcrypto/ts/ts_rsp_verify.c +++ b/src/lib/libcrypto/ts/ts_rsp_verify.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ts_rsp_verify.c,v 1.16 2015/07/19 18:25:59 miod Exp $ */ | 1 | /* $OpenBSD: ts_rsp_verify.c,v 1.17 2016/11/05 15:19:07 miod Exp $ */ |
2 | /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL | 2 | /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL |
3 | * project 2002. | 3 | * project 2002. |
4 | */ | 4 | */ |
@@ -244,7 +244,9 @@ TS_verify_cert(X509_STORE *store, STACK_OF(X509) *untrusted, X509 *signer, | |||
244 | TSerr(TS_F_TS_VERIFY_CERT, ERR_R_X509_LIB); | 244 | TSerr(TS_F_TS_VERIFY_CERT, ERR_R_X509_LIB); |
245 | goto err; | 245 | goto err; |
246 | } | 246 | } |
247 | X509_STORE_CTX_set_purpose(&cert_ctx, X509_PURPOSE_TIMESTAMP_SIGN); | 247 | if (X509_STORE_CTX_set_purpose(&cert_ctx, |
248 | X509_PURPOSE_TIMESTAMP_SIGN) == 0) | ||
249 | goto err; | ||
248 | i = X509_verify_cert(&cert_ctx); | 250 | i = X509_verify_cert(&cert_ctx); |
249 | if (i <= 0) { | 251 | if (i <= 0) { |
250 | int j = X509_STORE_CTX_get_error(&cert_ctx); | 252 | int j = X509_STORE_CTX_get_error(&cert_ctx); |