summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2017-09-20 16:52:37 +0000
committerjsing <>2017-09-20 16:52:37 +0000
commit8a110cc82bb2df37088502de9f15ac4c8fea6467 (patch)
tree6ff7229f8f2e5a8139ef2a36922e880956b60349 /src/lib
parentfb6a5cd3b238292c260e3f47a3e095a98c9b76d8 (diff)
downloadopenbsd-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.c13
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}