From 43c234029b050ec4b869ef9cff6f5698dbfa773c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moise=CC=81s=20Guimara=CC=83es?= Date: Tue, 26 Dec 2017 22:30:22 -0300 Subject: [PATCH] adds a call to wolfSSL_CTX_EnableOCSPStapling() on client.c to fix ocspstapling2 tests and removes unnecessary 'kill ' from the test scripts --- examples/client/client.c | 3 +++ scripts/ocsp-stapling-with-ca-as-responder.test | 2 +- scripts/ocsp-stapling.test | 2 +- scripts/ocsp-stapling2.test | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/client/client.c b/examples/client/client.c index a5d2d83f9..b5a71244b 100644 --- a/examples/client/client.c +++ b/examples/client/client.c @@ -1872,6 +1872,9 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args) #endif #ifdef HAVE_CERTIFICATE_STATUS_REQUEST if (statusRequest) { + if (wolfSSL_CTX_EnableOCSPStapling(ctx) != WOLFSSL_SUCCESS) + err_sys("can't enable OCSP Stapling Certificate Manager"); + switch (statusRequest) { case WOLFSSL_CSR_OCSP: if (wolfSSL_UseOCSPStapling(ssl, WOLFSSL_CSR_OCSP, diff --git a/scripts/ocsp-stapling-with-ca-as-responder.test b/scripts/ocsp-stapling-with-ca-as-responder.test index 5d5f521a1..3b538c9d1 100755 --- a/scripts/ocsp-stapling-with-ca-as-responder.test +++ b/scripts/ocsp-stapling-with-ca-as-responder.test @@ -2,7 +2,7 @@ # ocsp-stapling.test -trap 'for i in `jobs -p`; do pkill -TERM -P $i; kill $i; done' EXIT +trap 'for i in `jobs -p`; do pkill -TERM -P $i; done' EXIT server=login.live.com ca=certs/external/baltimore-cybertrust-root.pem diff --git a/scripts/ocsp-stapling.test b/scripts/ocsp-stapling.test index 2dbee5afd..02d7908c6 100755 --- a/scripts/ocsp-stapling.test +++ b/scripts/ocsp-stapling.test @@ -2,7 +2,7 @@ # ocsp-stapling.test -trap 'for i in `jobs -p`; do pkill -TERM -P $i; kill $i; done' EXIT +trap 'for i in `jobs -p`; do pkill -TERM -P $i; done' EXIT server=login.live.com ca=certs/external/baltimore-cybertrust-root.pem diff --git a/scripts/ocsp-stapling2.test b/scripts/ocsp-stapling2.test index db48161d8..7a5bed878 100755 --- a/scripts/ocsp-stapling2.test +++ b/scripts/ocsp-stapling2.test @@ -2,7 +2,7 @@ # ocsp-stapling.test -trap 'for i in `jobs -p`; do pkill -TERM -P $i; kill $i; done' EXIT +trap 'for i in `jobs -p`; do pkill -TERM -P $i; done' EXIT [ ! -x ./examples/client/client ] && echo -e "\n\nClient doesn't exist" && exit 1