aboutsummaryrefslogtreecommitdiff
path: root/test/cmp_ctx_test.c
diff options
context:
space:
mode:
authorVladimĂ­r Kotal <vladimir.kotal@oracle.com>2023-06-01 19:55:54 +0200
committerPauli <pauli@openssl.org>2023-06-06 11:05:02 +1000
commit3ca28c9e81fae36b0b44dc39beecd2b5a7561975 (patch)
tree4d1028ff958edec00915ef4b962c31c1c232ca9a /test/cmp_ctx_test.c
parentc69756e7a0133b67df50525e89206c9cc4a7d2b8 (diff)
downloadopenssl-3ca28c9e81fae36b0b44dc39beecd2b5a7561975.zip
openssl-3ca28c9e81fae36b0b44dc39beecd2b5a7561975.tar.gz
openssl-3ca28c9e81fae36b0b44dc39beecd2b5a7561975.tar.bz2
allow to disable http
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21108)
Diffstat (limited to 'test/cmp_ctx_test.c')
-rw-r--r--test/cmp_ctx_test.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/cmp_ctx_test.c b/test/cmp_ctx_test.c
index d85acae..485e0e4 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: */