diff options
Diffstat (limited to 'test/helpers')
-rw-r--r-- | test/helpers/quictestlib.c | 8 | ||||
-rw-r--r-- | test/helpers/quictestlib.h | 2 |
2 files changed, 10 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()); diff --git a/test/helpers/quictestlib.h b/test/helpers/quictestlib.h index f18cd29481..4e61b8965d 100644 --- a/test/helpers/quictestlib.h +++ b/test/helpers/quictestlib.h @@ -32,6 +32,8 @@ typedef struct qtest_fault_encrypted_extensions { #define QTEST_FLAG_FAKE_TIME (1 << 1) /* Introduce noise in the BIO */ #define QTEST_FLAG_NOISE (1 << 2) +/* Split datagrams such that each datagram contains one packet */ +#define QTEST_FLAG_PACKET_SPLIT (1 << 3) /* * Given an SSL_CTX for the client and filenames for the server certificate and |