diff options
author | jsing <> | 2017-09-20 16:52:37 +0000 |
---|---|---|
committer | jsing <> | 2017-09-20 16:52:37 +0000 |
commit | 8a110cc82bb2df37088502de9f15ac4c8fea6467 (patch) | |
tree | 6ff7229f8f2e5a8139ef2a36922e880956b60349 /src/lib | |
parent | fb6a5cd3b238292c260e3f47a3e095a98c9b76d8 (diff) | |
download | openbsd-8a110cc82bb2df37088502de9f15ac4c8fea6467.tar.gz openbsd-8a110cc82bb2df37088502de9f15ac4c8fea6467.tar.bz2 openbsd-8a110cc82bb2df37088502de9f15ac4c8fea6467.zip |
Slightly restructure tls_ocsp_verify_cb() to make it more like libtls code.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libtls/tls_ocsp.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/libtls/tls_ocsp.c b/src/lib/libtls/tls_ocsp.c index 9f6f940ecf..4e2dba3487 100644 --- a/src/lib/libtls/tls_ocsp.c +++ b/src/lib/libtls/tls_ocsp.c | |||
@@ -315,12 +315,13 @@ tls_ocsp_verify_cb(SSL *ssl, void *arg) | |||
315 | } | 315 | } |
316 | 316 | ||
317 | tls_ocsp_free(ctx->ocsp); | 317 | tls_ocsp_free(ctx->ocsp); |
318 | ctx->ocsp = tls_ocsp_setup_from_peer(ctx); | 318 | if ((ctx->ocsp = tls_ocsp_setup_from_peer(ctx)) == NULL) |
319 | if (ctx->ocsp != NULL) { | 319 | return 0; |
320 | if (ctx->config->verify_cert == 0 || ctx->config->verify_time == 0) | 320 | |
321 | return 1; | 321 | if (ctx->config->verify_cert == 0 || ctx->config->verify_time == 0) |
322 | res = tls_ocsp_process_response_internal(ctx, raw, size); | 322 | return 1; |
323 | } | 323 | |
324 | res = tls_ocsp_process_response_internal(ctx, raw, size); | ||
324 | 325 | ||
325 | return (res == 0) ? 1 : 0; | 326 | return (res == 0) ? 1 : 0; |
326 | } | 327 | } |