From 8f77db28427df202d9d6bcbac96da4d1daec099d Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Thu, 28 Apr 2022 15:06:38 -0400 Subject: [PATCH] test: Re-init pregenerated RSA keys for NSS only Not revalidating keys on every fork speeds up make test from about 45 seconds to 10 seconds with OpenSSL 1.1.1n and from 6 minutes to 10 seconds with OpenSSL 3.0.2. --- src/test/testing_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/testing_common.c b/src/test/testing_common.c index 2fd424c07e..88d04e6082 100644 --- a/src/test/testing_common.c +++ b/src/test/testing_common.c @@ -244,14 +244,18 @@ void tinytest_postfork(void); void tinytest_prefork(void) { +#ifdef ENABLE_NSS free_pregenerated_keys(); +#endif subsystems_prefork(); } void tinytest_postfork(void) { subsystems_postfork(); +#ifdef ENABLE_NSS init_pregenerated_keys(); +#endif } static void