diff options
-rw-r--r-- | test/helpers/quictestlib.c | 4 | ||||
-rw-r--r-- | test/quicapitest.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/test/helpers/quictestlib.c b/test/helpers/quictestlib.c index be98e205ff..1b204658bf 100644 --- a/test/helpers/quictestlib.c +++ b/test/helpers/quictestlib.c @@ -16,6 +16,7 @@ #if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG) # include "../threadstest.h" #endif +#include "internal/quic_ssl.h" #include "internal/quic_wire_pkt.h" #include "internal/quic_record_tx.h" #include "internal/quic_error.h" @@ -172,7 +173,10 @@ int qtest_create_quic_objects(OSSL_LIB_CTX *libctx, SSL_CTX *clientctx, tserver_args.ctx = serverctx; if ((flags & QTEST_FLAG_FAKE_TIME) != 0) { fake_now = ossl_time_zero(); + /* zero time can have a special meaning, bump it */ + qtest_add_time(1); tserver_args.now_cb = fake_now_cb; + (void)ossl_quic_conn_set_override_now_cb(*cssl, fake_now_cb, NULL); } if (!TEST_ptr(*qtserv = ossl_quic_tserver_new(&tserver_args, certfile, diff --git a/test/quicapitest.c b/test/quicapitest.c index d17d704d29..91e63429a5 100644 --- a/test/quicapitest.c +++ b/test/quicapitest.c @@ -456,7 +456,9 @@ static int test_ssl_trace(void) if (!TEST_ptr(cctx) || !TEST_ptr(bio) || !TEST_true(qtest_create_quic_objects(libctx, cctx, NULL, cert, - privkey, 0, &qtserv, + privkey, + QTEST_FLAG_FAKE_TIME, + &qtserv, &clientquic, NULL))) goto err; |