diff options
author | Hugo Landau <hlandau@openssl.org> | 2022-11-17 16:03:00 +0000 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2023-01-13 13:20:16 +0000 |
commit | 6292519cd8102983e9924b6b0d3f298ac5f93e80 (patch) | |
tree | 4165c88c36ad9f44df8f5e8526054cd93daccca8 /test | |
parent | 44019a69c4ae305f1f753f836c4d06ac63a8c6f3 (diff) | |
download | openssl-new-6292519cd8102983e9924b6b0d3f298ac5f93e80.tar.gz |
QUIC: Enable building with QUIC support disabled
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19703)
Diffstat (limited to 'test')
-rw-r--r-- | test/packettest.c | 6 | ||||
-rw-r--r-- | test/wpackettest.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/test/packettest.c b/test/packettest.c index 68b6d679b9..e1e7a0859d 100644 --- a/test/packettest.c +++ b/test/packettest.c @@ -465,6 +465,8 @@ static int test_PACKET_as_length_prefixed_2(void) return 1; } +#ifndef OPENSSL_NO_QUIC + static int test_PACKET_get_quic_vlint(void) { struct quic_test_case { @@ -569,6 +571,8 @@ static int test_PACKET_get_quic_length_prefixed(void) return 1; } +#endif + int setup_tests(void) { unsigned int i; @@ -599,7 +603,9 @@ int setup_tests(void) ADD_TEST(test_PACKET_get_length_prefixed_3); ADD_TEST(test_PACKET_as_length_prefixed_1); ADD_TEST(test_PACKET_as_length_prefixed_2); +#ifndef OPENSSL_NO_QUIC ADD_TEST(test_PACKET_get_quic_vlint); ADD_TEST(test_PACKET_get_quic_length_prefixed); +#endif return 1; } diff --git a/test/wpackettest.c b/test/wpackettest.c index 0aea34188b..bcfe67bbfa 100644 --- a/test/wpackettest.c +++ b/test/wpackettest.c @@ -26,6 +26,8 @@ static const unsigned char simpleder[] = { 0xfc, 0x04, 0x00, 0x01, 0x02, 0x03, 0xff, 0xfe, 0xfd }; +#ifndef OPENSSL_NO_QUIC + /* QUIC sub-packet with 4-byte length prefix, containing a 1-byte vlint */ static const unsigned char quic1[] = { 0x80, 0x00, 0x00, 0x01, 0x09 }; /* QUIC sub-packet with 1-byte length prefix, containing a 1-byte vlint */ @@ -50,6 +52,8 @@ static const unsigned char quic7[] = { 0x40, 0x01, 0x11, 0x40, 0x01, 0x12, 0x40, 0x01, 0x13 }; +#endif + static BUF_MEM *buf; static int cleanup(WPACKET *pkt) @@ -448,6 +452,8 @@ static int test_WPACKET_init_der(void) return 1; } +#ifndef OPENSSL_NO_QUIC + static int test_WPACKET_quic(void) { WPACKET pkt; @@ -621,6 +627,8 @@ static int test_WPACKET_quic_vlint_random(void) return 1; } +#endif + int setup_tests(void) { if (!TEST_ptr(buf = BUF_MEM_new())) @@ -633,8 +641,10 @@ int setup_tests(void) ADD_TEST(test_WPACKET_allocate_bytes); ADD_TEST(test_WPACKET_memcpy); ADD_TEST(test_WPACKET_init_der); +#ifndef OPENSSL_NO_QUIC ADD_TEST(test_WPACKET_quic); ADD_TEST(test_WPACKET_quic_vlint_random); +#endif return 1; } |