Wrap more of ocspapitest.c in OPENSSL_NO_OCSP
authorBenjamin Kaduk <bkaduk@akamai.com>
Thu, 7 Dec 2017 22:37:54 +0000 (16:37 -0600)
committerBen Kaduk <kaduk@mit.edu>
Wed, 13 Dec 2017 01:08:22 +0000 (19:08 -0600)
make_dummy_resp() uses OCSP types, and get_cert_and_key() is unused
once make_dummy_resp() is compiled out, so neither can be included
in the build when OCSP is disabled and strict warnings are active.

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit cb091295a9ff16f4de1a8b00be444d40ac068d04)

(Merged from https://github.com/openssl/openssl/pull/4723)

test/ocspapitest.c

index 6d61864c413a1aa1124842579d28de4c16917d29..42befe71b90df880817ea68f5c1a5fb37812d27b 100644 (file)
@@ -21,6 +21,7 @@
 static const char *certstr;
 static const char *privkeystr;
 
+#ifndef OPENSSL_NO_OCSP
 static int get_cert_and_key(X509 **cert_out, EVP_PKEY **key_out)
 {
     BIO *certbio, *keybio;
@@ -86,7 +87,6 @@ static OCSP_BASICRESP *make_dummy_resp(void)
     return bs_out;
 }
 
-#ifndef OPENSSL_NO_OCSP
 static int test_resp_signer(void)
 {
     OCSP_BASICRESP *bs = NULL;