summaryrefslogtreecommitdiff
path: root/src/regress/lib/libssl
diff options
context:
space:
mode:
authortb <>2022-10-26 20:31:38 +0000
committertb <>2022-10-26 20:31:38 +0000
commitc37e55335c8b56e764d4a5cfc3bd92c4ba302ee5 (patch)
tree6e942191193bed094505065c40df4b277e6654bf /src/regress/lib/libssl
parent88de4fbdc4fa41e45c9984b27210a338e1c2de2f (diff)
downloadopenbsd-c37e55335c8b56e764d4a5cfc3bd92c4ba302ee5.tar.gz
openbsd-c37e55335c8b56e764d4a5cfc3bd92c4ba302ee5.tar.bz2
openbsd-c37e55335c8b56e764d4a5cfc3bd92c4ba302ee5.zip
dtlstest: Ensure the timeouts are at least 10 ms. This makes these tests
a bit less flaky if the machine is otherwise under load. from jsing
Diffstat (limited to 'src/regress/lib/libssl')
-rw-r--r--src/regress/lib/libssl/dtls/dtlstest.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/regress/lib/libssl/dtls/dtlstest.c b/src/regress/lib/libssl/dtls/dtlstest.c
index 3819039f82..2d0d6cf5e8 100644
--- a/src/regress/lib/libssl/dtls/dtlstest.c
+++ b/src/regress/lib/libssl/dtls/dtlstest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dtlstest.c,v 1.16 2022/10/02 16:38:23 jsing Exp $ */ 1/* $OpenBSD: dtlstest.c,v 1.17 2022/10/26 20:31:38 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2020, 2021 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2020, 2021 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -365,6 +365,12 @@ poll_timeout(SSL *client, SSL *server)
365 if (DTLSv1_get_timeout(server, &timeout)) 365 if (DTLSv1_get_timeout(server, &timeout))
366 server_timeout = timeout.tv_sec * 1000 + timeout.tv_usec / 1000; 366 server_timeout = timeout.tv_sec * 1000 + timeout.tv_usec / 1000;
367 367
368 if (client_timeout < 10)
369 client_timeout = 10;
370 if (server_timeout < 10)
371 server_timeout = 10;
372
373 /* XXX */
368 if (client_timeout <= 0) 374 if (client_timeout <= 0)
369 return server_timeout; 375 return server_timeout;
370 if (client_timeout > 0 && server_timeout <= 0) 376 if (client_timeout > 0 && server_timeout <= 0)