summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2023-08-07 20:04:07 +0200
committerTomas Mraz <tomas@openssl.org>2023-08-14 15:55:33 +0200
commit4cc16b0557875829041547dc63c7600b1ca57a14 (patch)
treedbb4ea08cccef03e755cd0c40063fd6c8dbe6b9b /test
parenta5df3fc093c8ef17152e6c645be6fa9a77c56679 (diff)
quic_record_test.c: For tests that require ChaCha require also Poly1305
as both algorithms are really needed. Fixes #21625 Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> (Merged from https://github.com/openssl/openssl/pull/21677)
Diffstat (limited to 'test')
-rw-r--r--test/quic_record_test.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/quic_record_test.c b/test/quic_record_test.c
index 89d9451a32..2521b0ce2c 100644
--- a/test/quic_record_test.c
+++ b/test/quic_record_test.c
@@ -146,7 +146,7 @@ static const struct rx_test_op rx_script_1[] = {
};
/* 2. RFC 9001 - A.5 ChaCha20-Poly1305 Short Header Packet */
-#ifndef OPENSSL_NO_CHACHA
+#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
static const unsigned char rx_script_2_in[] = {
0x4c, 0xfe, 0x41, 0x89, 0x65, 0x5e, 0x5c, 0xd5, 0x5c, 0x41, 0xf6, 0x90,
0x80, 0x57, 0x5d, 0x79, 0x99, 0xc2, 0x5a, 0x5b, 0xfb
@@ -180,7 +180,7 @@ static const struct rx_test_op rx_script_2[] = {
RX_OP_CHECK_NO_PKT()
RX_OP_END
};
-#endif /* !defined(OPENSSL_NO_CHACHA) */
+#endif /* !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) */
/* 3. Real World - Version Negotiation Response */
static const unsigned char rx_script_3_in[] = {
@@ -1020,7 +1020,7 @@ static const struct rx_test_op rx_script_6[] = {
* 7. Real World - S2C Multiple Packets
* - Initial, Handshake, 1-RTT (ChaCha20-Poly1305)
*/
-#ifndef OPENSSL_NO_CHACHA
+#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
static const QUIC_CONN_ID rx_script_7_c2s_init_dcid = {
4, {0xfa, 0x5d, 0xd6, 0x80}
};
@@ -1378,7 +1378,7 @@ static const struct rx_test_op rx_script_7[] = {
RX_OP_END
};
-#endif /* !defined(OPENSSL_NO_CHACHA) */
+#endif /* !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) */
/*
* 8. Real World - S2C Multiple Packets with Peer Initiated Key Phase Update
@@ -1698,14 +1698,14 @@ static const struct rx_test_op rx_script_9[] = {
static const struct rx_test_op *rx_scripts[] = {
rx_script_1,
-#ifndef OPENSSL_NO_CHACHA
+#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
rx_script_2,
#endif
rx_script_3,
rx_script_4,
rx_script_5,
rx_script_6,
-#ifndef OPENSSL_NO_CHACHA
+#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
rx_script_7,
#endif
rx_script_8,
@@ -2768,7 +2768,7 @@ static int test_wire_pkt_hdr_actual(int tidx, int repeat, int cipher,
* Removing all dependence on CHACHA is more difficult and these
* tests are fast enough.
*/
-#ifndef OPENSSL_NO_CHACHA
+#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
hpr_cipher_id = QUIC_HDR_PROT_CIPHER_CHACHA;
#else
hpr_cipher_id = QUIC_HDR_PROT_CIPHER_AES_256;
@@ -3256,7 +3256,7 @@ static const struct tx_test_op tx_script_2[] = {
TX_OP_END
};
-#ifndef OPENSSL_NO_CHACHA
+#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
/* 3. RFC 9001 - A.5 ChaCha20-Poly1305 Short Header Packet */
static const unsigned char tx_script_3_body[] = {
0x01
@@ -3307,7 +3307,7 @@ static const struct tx_test_op tx_script_3[] = {
TX_OP_WRITE_CHECK(3)
TX_OP_END
};
-#endif /* !defined(OPENSSL_NO_CHACHA) */
+#endif /* !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305) */
/* 4. Real World - AES-128-GCM Key Update */
static const unsigned char tx_script_4_secret[] = {
@@ -3580,7 +3580,7 @@ static const struct tx_test_op tx_script_6[] = {
static const struct tx_test_op *const tx_scripts[] = {
tx_script_1,
tx_script_2,
-#ifndef OPENSSL_NO_CHACHA
+#if !defined(OPENSSL_NO_CHACHA) && !defined(OPENSSL_NO_POLY1305)
tx_script_3,
#endif
tx_script_4,