Use OCSP override URL enable in both example client and server.

This commit is contained in:
John Safranek 2013-12-18 12:34:40 -08:00
parent 75e6ac534e
commit 4ffc92a4d6
2 changed files with 11 additions and 7 deletions

View File

@ -507,12 +507,12 @@ THREAD_RETURN CYASSL_THREAD client_test(void* args)
if (useOcsp) { if (useOcsp) {
if (ocspUrl != NULL) { if (ocspUrl != NULL) {
CyaSSL_CTX_OCSP_set_override_url(ctx, ocspUrl); CyaSSL_CTX_OCSP_set_override_url(ctx, ocspUrl);
CyaSSL_CTX_OCSP_set_options(ctx, CYASSL_OCSP_URL_OVERRIDE | CyaSSL_CTX_OCSP_set_options(ctx, CYASSL_OCSP_ENABLE |
CYASSL_OCSP_ENABLE | CYASSL_OCSP_NO_NONCE); CYASSL_OCSP_URL_OVERRIDE | CYASSL_OCSP_NO_NONCE);
} }
else else
CyaSSL_CTX_OCSP_set_options(ctx, CyaSSL_CTX_OCSP_set_options(ctx, CYASSL_OCSP_ENABLE |
CYASSL_OCSP_ENABLE | CYASSL_OCSP_NO_NONCE); CYASSL_OCSP_NO_NONCE);
} }
#endif #endif

View File

@ -459,10 +459,14 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
#endif #endif
#ifdef HAVE_OCSP #ifdef HAVE_OCSP
if (useOcsp) { if (useOcsp) {
CyaSSL_CTX_OCSP_set_options(ctx, if (ocspUrl != NULL) {
CYASSL_OCSP_ENABLE | CYASSL_OCSP_NO_NONCE);
if (ocspUrl != NULL)
CyaSSL_CTX_OCSP_set_override_url(ctx, ocspUrl); 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 #endif
#ifdef HAVE_PK_CALLBACKS #ifdef HAVE_PK_CALLBACKS