diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/build.info | 18 | ||||
-rw-r--r-- | test/cmp_ctx_test.c | 8 | ||||
-rw-r--r-- | test/recipes/79-test_http.t | 5 | ||||
-rw-r--r-- | test/recipes/80-test_cmp_http.t | 2 |
4 files changed, 23 insertions, 10 deletions
diff --git a/test/build.info b/test/build.info index f6f19d6407..13f81226ba 100644 --- a/test/build.info +++ b/test/build.info @@ -57,7 +57,7 @@ IF[{- !$disabled{tests} -}] x509_time_test x509_dup_cert_test x509_check_cert_pkey_test \ recordlentest drbgtest rand_status_test sslbuffertest \ time_offset_test pemtest ssl_cert_table_internal_test ciphername_test \ - http_test servername_test ocspapitest fatalerrtest tls13ccstest \ + servername_test ocspapitest fatalerrtest tls13ccstest \ sysdefaulttest errtest ssl_ctx_test build_wincrypt_test \ context_internal_test aesgcmtest params_test evp_pkey_dparams_test \ keymgmt_internal_test hexstr_test provider_status_test defltfips_test \ @@ -515,12 +515,14 @@ IF[{- !$disabled{tests} -}] DEPEND[ocspapitest]=../libcrypto libtestutil.a IF[{- !$disabled{sock} -}] - PROGRAMS{noinst}=http_test - ENDIF + IF[{- !$disabled{http} -}] + PROGRAMS{noinst}=http_test - SOURCE[http_test]=http_test.c - INCLUDE[http_test]=../include ../apps/include - DEPEND[http_test]=../libcrypto libtestutil.a + SOURCE[http_test]=http_test.c + INCLUDE[http_test]=../include ../apps/include + DEPEND[http_test]=../libcrypto libtestutil.a + ENDIF + ENDIF SOURCE[dtlstest]=dtlstest.c helpers/ssltestlib.c INCLUDE[dtlstest]=../include ../apps/include @@ -590,10 +592,6 @@ IF[{- !$disabled{tests} -}] INCLUDE[ciphername_test]=../include ../apps/include DEPEND[ciphername_test]=../libcrypto ../libssl libtestutil.a - SOURCE[http_test]=http_test.c - INCLUDE[http_test]=../include ../apps/include - DEPEND[http_test]=../libcrypto libtestutil.a - SOURCE[servername_test]=servername_test.c helpers/ssltestlib.c INCLUDE[servername_test]=../include ../apps/include DEPEND[servername_test]=../libcrypto ../libssl libtestutil.a diff --git a/test/cmp_ctx_test.c b/test/cmp_ctx_test.c index d85acae58b..485e0e47f1 100644 --- a/test/cmp_ctx_test.c +++ b/test/cmp_ctx_test.c @@ -318,10 +318,12 @@ static int test_cmp_ctx_log_cb(void) return result; } +#ifndef OPENSSL_NO_HTTP static BIO *test_http_cb(BIO *bio, void *arg, int use_ssl, int detail) { return NULL; } +#endif static OSSL_CMP_MSG *test_transfer_cb(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *req) @@ -560,7 +562,9 @@ static X509_STORE *X509_STORE_new_1(void) STACK_OF(TYPE)*, NULL, IS_0, \ sk_##TYPE##_new_null(), sk_##TYPE##_free) +#ifndef OPENSSL_NO_HTTP typedef OSSL_HTTP_bio_cb_t OSSL_CMP_http_cb_t; +#endif #define DEFINE_SET_CB_TEST(FIELD) \ static OSSL_CMP_##FIELD##_t OSSL_CMP_CTX_get_##FIELD(const CMP_CTX *ctx) \ { \ @@ -746,8 +750,10 @@ DEFINE_SET_TEST(OSSL_CMP, CTX, 1, 1, server, char) DEFINE_SET_INT_TEST(serverPort) DEFINE_SET_TEST(OSSL_CMP, CTX, 1, 1, proxy, char) DEFINE_SET_TEST(OSSL_CMP, CTX, 1, 1, no_proxy, char) +#ifndef OPENSSL_NO_HTTP DEFINE_SET_CB_TEST(http_cb) DEFINE_SET_GET_P_VOID_TEST(http_cb_arg) +#endif DEFINE_SET_CB_TEST(transfer_cb) DEFINE_SET_GET_P_VOID_TEST(transfer_cb_arg) @@ -837,8 +843,10 @@ int setup_tests(void) ADD_TEST(test_CTX_set_get_serverPort); ADD_TEST(test_CTX_set1_get0_proxy); ADD_TEST(test_CTX_set1_get0_no_proxy); +#ifndef OPENSSL_NO_HTTP ADD_TEST(test_CTX_set_get_http_cb); ADD_TEST(test_CTX_set_get_http_cb_arg); +#endif ADD_TEST(test_CTX_set_get_transfer_cb); ADD_TEST(test_CTX_set_get_transfer_cb_arg); /* server authentication: */ diff --git a/test/recipes/79-test_http.t b/test/recipes/79-test_http.t index b3ac70fdeb..ecf6eb23a2 100644 --- a/test/recipes/79-test_http.t +++ b/test/recipes/79-test_http.t @@ -12,11 +12,16 @@ use OpenSSL::Test::Utils; setup("test_http"); +plan skip_all => "HTTP protocol is not supported by this OpenSSL build" + if disabled('http'); +plan skip_all => "not supported by no-sock build" if disabled('sock'); + plan tests => 2; SKIP: { skip "sockets disabled", 1 if disabled("sock"); skip "OCSP disabled", 1 if disabled("ocsp"); + skip "HTTP disabled", 1 if disabled("http"); my $cmd = [qw{openssl ocsp -index any -port 0}]; my @output = run(app($cmd), capture => 1); $output[0] =~ s/\r\n/\n/g; diff --git a/test/recipes/80-test_cmp_http.t b/test/recipes/80-test_cmp_http.t index 5fbdb930c9..4fd03e8b2d 100644 --- a/test/recipes/80-test_cmp_http.t +++ b/test/recipes/80-test_cmp_http.t @@ -30,6 +30,8 @@ plan skip_all => "These tests are not supported in a no-ec build" if disabled("ec"); plan skip_all => "These tests are not supported in a no-sock build" if disabled("sock"); +plan skip_all => "These tests are not supported in a no-http build" + if disabled("http"); plan skip_all => "Tests involving local HTTP server not available on Windows or VMS" if $^O =~ /^(VMS|MSWin32|msys)$/; |