summaryrefslogtreecommitdiff
path: root/test/helpers
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2022-12-02 14:38:46 +0000
committerHugo Landau <hlandau@openssl.org>2023-02-22 05:34:03 +0000
commitd03fe5de8d1b78dd8190a9bce04bb228719b9947 (patch)
treee56b0aedc2e42b15800f2ec044d78f094899ebec /test/helpers
parent71587f2b6a711bc8cd18521575910291f637dfcf (diff)
downloadopenssl-new-d03fe5de8d1b78dd8190a9bce04bb228719b9947.tar.gz
Add the ability to mutate TLS handshake messages before they are written
We add callbacks so that TLS handshake messages can be modified by the test framework before they are passed to the handshake hash, possibly encrypted and written to the network. This enables us to simulate badly behaving endpoints. Reviewed-by: Hugo Landau <hlandau@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20030)
Diffstat (limited to 'test/helpers')
-rw-r--r--test/helpers/quictestlib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/helpers/quictestlib.c b/test/helpers/quictestlib.c
index 34672a5913..a4af783034 100644
--- a/test/helpers/quictestlib.c
+++ b/test/helpers/quictestlib.c
@@ -240,8 +240,10 @@ int ossl_quic_fault_set_packet_plain_listener(OSSL_QUIC_FAULT *fault,
fault->pplaincb = pplaincb;
fault->pplaincbarg = pplaincbarg;
- return ossl_quic_tserver_set_mutator(fault->qtserv, packet_plain_mutate,
- packet_plain_finish, fault);
+ return ossl_quic_tserver_set_plain_packet_mutator(fault->qtserv,
+ packet_plain_mutate,
+ packet_plain_finish,
+ fault);
}
/* To be called from a packet_plain_listener callback */