diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2017-09-20 16:52:38 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2017-09-20 16:52:38 +0000 |
commit | a91ad4ce164afd7d247ffc81e518dec307624972 (patch) | |
tree | c903a506fc1b94ff3bba8f0fdd5fface4830425d | |
parent | c87c4a86c8c0ff4ffc6571fd0168ed24872855ab (diff) |
Slightly restructure tls_ocsp_verify_cb() to make it more like libtls code.
-rw-r--r-- | lib/libtls/tls_ocsp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libtls/tls_ocsp.c b/lib/libtls/tls_ocsp.c index 9f6f940ecfb..4e2dba34870 100644 --- a/lib/libtls/tls_ocsp.c +++ b/lib/libtls/tls_ocsp.c @@ -315,12 +315,13 @@ tls_ocsp_verify_cb(SSL *ssl, void *arg) } tls_ocsp_free(ctx->ocsp); - ctx->ocsp = tls_ocsp_setup_from_peer(ctx); - if (ctx->ocsp != NULL) { - if (ctx->config->verify_cert == 0 || ctx->config->verify_time == 0) - return 1; - res = tls_ocsp_process_response_internal(ctx, raw, size); - } + if ((ctx->ocsp = tls_ocsp_setup_from_peer(ctx)) == NULL) + return 0; + + if (ctx->config->verify_cert == 0 || ctx->config->verify_time == 0) + return 1; + + res = tls_ocsp_process_response_internal(ctx, raw, size); return (res == 0) ? 1 : 0; } |