From: Abel Thomas Date: Wed, 8 Jul 2026 08:19:40 +0000 (+0200) Subject: pkcs7_test: disable time checks in pkcs7_verify_test X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c2ebb79f8d9153343e422bc6fb3195e4bcb4f782;p=thirdparty%2Fopenssl.git pkcs7_test: disable time checks in pkcs7_verify_test The test certificate has a hardcoded validity period, making `pkcs7_verify_test` fail when run under a faketime outside that window. Set `X509_V_FLAG_NO_CHECK_TIME` on the store so verification no longer depends on the system clock. Fixes #31788 Reviewed-by: Andrew Dinh Reviewed-by: Jakub Zelenka Reviewed-by: Paul Dale MergeDate: Wed Jul 29 16:54:09 2026 (Merged from https://github.com/openssl/openssl/pull/31890) --- diff --git a/test/pkcs7_test.c b/test/pkcs7_test.c index 6362645e47b..2fe7064c01a 100644 --- a/test/pkcs7_test.c +++ b/test/pkcs7_test.c @@ -181,6 +181,7 @@ static int pkcs7_verify_test(void) && TEST_int_eq(ERR_peek_error(), 0) && TEST_ptr(store = X509_STORE_new()) && TEST_true(X509_STORE_add_cert(store, cert)) + && TEST_true(X509_STORE_set_flags(store, X509_V_FLAG_NO_CHECK_TIME)) && TEST_ptr(p7 = SMIME_read_PKCS7(bio, NULL)) && TEST_int_eq(ERR_peek_error(), 0) && TEST_true(PKCS7_verify(p7, NULL, store, msg_bio, NULL, PKCS7_TEXT))