diff options
author | Matt Caswell <matt@openssl.org> | 2023-09-19 12:21:27 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2023-09-22 13:56:43 +0100 |
commit | b1584a85d07fdf1cfaa7423392fba439f7b6b0ac (patch) | |
tree | dec4f66f47c3e6dc70490828615d4364fd958be4 /test/helpers/quictestlib.c | |
parent | 35bd8a60043bde500f777e465530076524d2534a (diff) |
Extend the noisy dgram test so that packets are also affected by noise
Where multiple packets are in a single datagram we split them so that all
packets can be affected by the noise
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22157)
Diffstat (limited to 'test/helpers/quictestlib.c')
-rw-r--r-- | test/helpers/quictestlib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/helpers/quictestlib.c b/test/helpers/quictestlib.c index 6381d720ff..3c3cb73f96 100644 --- a/test/helpers/quictestlib.c +++ b/test/helpers/quictestlib.c @@ -141,6 +141,14 @@ int qtest_create_quic_objects(OSSL_LIB_CTX *libctx, SSL_CTX *clientctx, goto err; } + if ((flags & QTEST_FLAG_PACKET_SPLIT) != 0) { + BIO *pktsplitbio = BIO_new(bio_f_pkt_split_dgram_filter()); + + if (!TEST_ptr(pktsplitbio)) + goto err; + cbio = BIO_push(pktsplitbio, cbio); + } + if ((flags & QTEST_FLAG_NOISE) != 0) { BIO *noisebio = BIO_new(bio_f_noisy_dgram_filter()); |