From 4ffc92a4d6736bedc3e9f4806e7d78f56423cba1 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Wed, 18 Dec 2013 12:34:40 -0800 Subject: [PATCH] Use OCSP override URL enable in both example client and server. --- examples/client/client.c | 8 ++++---- examples/server/server.c | 10 +++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/examples/client/client.c b/examples/client/client.c index d973de638..9a9c41c32 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -507,12 +507,12 @@ THREAD_RETURN CYASSL_THREAD client_test(void* args) if (useOcsp) { if (ocspUrl != NULL) { CyaSSL_CTX_OCSP_set_override_url(ctx, ocspUrl); - CyaSSL_CTX_OCSP_set_options(ctx, CYASSL_OCSP_URL_OVERRIDE | - CYASSL_OCSP_ENABLE | CYASSL_OCSP_NO_NONCE); + CyaSSL_CTX_OCSP_set_options(ctx, CYASSL_OCSP_ENABLE | + CYASSL_OCSP_URL_OVERRIDE | CYASSL_OCSP_NO_NONCE); } else - CyaSSL_CTX_OCSP_set_options(ctx, - CYASSL_OCSP_ENABLE | CYASSL_OCSP_NO_NONCE); + CyaSSL_CTX_OCSP_set_options(ctx, CYASSL_OCSP_ENABLE | + CYASSL_OCSP_NO_NONCE); } #endif diff --git a/examples/server/server.c b/examples/server/server.c index 9be9c4802..863999c79 100644 --- a/examples/server/server.c +++ b/examples/server/server.c @@ -459,10 +459,14 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args) #endif #ifdef HAVE_OCSP if (useOcsp) { - CyaSSL_CTX_OCSP_set_options(ctx, - CYASSL_OCSP_ENABLE | CYASSL_OCSP_NO_NONCE); - if (ocspUrl != NULL) + if (ocspUrl != NULL) { CyaSSL_CTX_OCSP_set_override_url(ctx, ocspUrl); + CyaSSL_CTX_OCSP_set_options(ctx, CYASSL_OCSP_ENABLE | + CYASSL_OCSP_URL_OVERRIDE | CYASSL_OCSP_NO_NONCE); + } + else + CyaSSL_CTX_OCSP_set_options(ctx, CYASSL_OCSP_ENABLE | + CYASSL_OCSP_NO_NONCE); } #endif #ifdef HAVE_PK_CALLBACKS