dep-openssl/test
Mounir IDRASSI 5f48317d6d Restore empty raw PKCS#1 verify-recover behavior
EVP_PKEY_verify_recover() with RSA PKCS#1 v1.5 padding and no configured
signature digest rejected a valid signature whose recovered payload is
empty, instead of returning success with a recovered length of zero.

RSA_public_decrypt() returns -1 on error and otherwise the number of
recovered bytes, which may legitimately be zero for a raw PKCS#1 v1.5
signature that encodes an empty payload.  Pull request #28306 ("Make
error checks on RSA_public_decrypt() consistent") changed the error
check in the raw, no-digest verify-recover path from "ret < 0" to
"ret <= 0", so a valid zero recovered length was mistaken for an error.

Restore the "< 0" check in that branch only, leaving the digest-aware
PKCS#1, X9.31, PSS and ordinary verification paths untouched.

Add test_RSA_verify_recover_empty_payload, which performs a complete
zero-length raw PKCS#1 v1.5 sign-and-recover round trip through EVP and
fails on the unmodified implementation specifically at the
EVP_PKEY_verify_recover() call.  OpenSSL 3.0.13 recovers the same
signature and reports a zero-byte result.

The behavior regressed as a result of #28306.

Fixes #32000

Assisted-by: OpenCode:GLM-5.2

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Jakub Zelenka <jakub.zelenka@openssl.foundation>
MergeDate: Fri Jul 24 13:06:58 2026
(Merged from https://github.com/openssl/openssl/pull/32001)
2026-07-24 15:06:51 +02:00
..
certs Fix DSA with SHA-384 / SHA-512 X.509 verification (issue openssl#30432) 2026-07-20 13:10:45 +02:00
cms-msg Test for CVE-2026-42766 2026-06-11 17:08:41 +02:00
ct
d2i-tests
helpers Convert internal use of ASN1_STRING_set and ASN1_STRING_length 2026-07-18 15:01:13 +02:00
mfail mfail: add sampled and count-only modes to test driver 2026-07-13 11:43:40 +02:00
ocsp-tests s_server: test ocsp with "-cert_chain" 2024-03-12 19:54:27 +01:00
quic-openssl-docker Copyright year updates 2026-03-10 14:37:52 +00:00
radix Wire radix QUIC test framework clock to simulated time 2026-07-21 11:22:31 +02:00
recipes Reject unknown TLS 1.3 ServerHello extensions 2026-07-23 17:55:07 +02:00
smime-certs Implement KEMRecipientInfo (RFC9629) in CMS 2025-07-30 11:39:04 +02:00
smime-eml Test for CVE-2026-45447 (UAF in PKCS7_verify) 2026-06-11 17:08:41 +02:00
ssl-tests Improve TLS handling of EC point formats 2026-07-10 11:21:28 +02:00
testutil mfail: add sampled and count-only modes to test driver 2026-07-13 11:43:40 +02:00
unit mkwraps: resolve system (libc) functions via compiler include paths 2026-07-20 09:00:49 +02:00
aborttest.c
acvp_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
acvp_test.inc RSA: Update RSA keygen. 2025-11-13 12:05:30 +01:00
aesgcmtest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
aeswrap_test.c aes_wrap: prevent crash on update without a key 2026-06-03 13:51:57 +02:00
algorithmid_test.c Constify return value of X509_get_X509_PUBKEY() 2025-12-23 08:16:37 -05:00
asn1_decode_test.c Don't raise NOT_ENOUGH_DATA on a clean EOF at an object boundary 2026-07-13 10:04:34 +02:00
asn1_dsa_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
asn1_encode_test.c Missed a spot! 2025-12-17 10:19:43 -05:00
asn1_internal_test.c Add parentheses around sizeof arguments 2026-07-08 12:10:14 +02:00
asn1_stable_parse_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
asn1_string_table_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
asn1_string_test.c Convert internal use of ASN1_STRING_set and ASN1_STRING_length 2026-07-18 15:01:13 +02:00
asn1_time_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
asynciotest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
asynctest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bad_dtls_test.c Fix broken hex data by reformatting 2026-06-03 09:46:03 +02:00
base64_simdutf_test.c Use proper compiler features abstraction for older compilers 2026-04-22 09:22:48 +02:00
bftest.c Eliminate unnecessary type casts of int constants 2026-07-08 12:09:47 +02:00
bio_addr_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bio_base64_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
bio_callback_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
bio_comp_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bio_core_test.c BIO_vprintf: fix off-by-one at 512-byte buffer boundary 2026-07-08 13:24:19 +02:00
bio_dgram_test.c Add mfail test for new BIO dgram mem 2026-05-11 10:09:13 +02:00
bio_enc_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bio_eof_test.c Fix BIO_write on file BIOs to report partial writes. 2026-06-15 16:42:19 +02:00
bio_memleak_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bio_meth_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bio_prefix_text.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bio_pw_callback_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bio_readbuffer_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bio_socket_sigpipe_test.c Fixes Coverity issue CID 1681693 2026-02-28 08:23:41 -05:00
bio_tfo_test.c test: respect disabled IPv6 in bio_tfo_test 2026-05-03 17:25:36 +02:00
bn_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bn_rand_range.h 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
bntest.c tests: Check the return value of BN_hex2bn() 2026-07-20 11:04:11 +02:00
bntests.pl
build.info Extend TLS group list parser test cases 2026-07-20 09:12:19 +02:00
build_wincrypt_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
byteorder_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ca-and-certs.cnf Remove unused crl_dir setting from config files 2026-06-03 13:36:56 +02:00
ca_internals_test.c test: Invert bad TEST() condition calls 2026-06-15 09:38:43 +02:00
casttest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
CAtsa.cnf
cc_dummy.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cert_comp_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
chacha_internal_test.c Move *_arch.h to include/arch 2026-05-10 11:53:33 +02:00
cipher_overhead_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cipherbytes_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
cipherlist_test.c test: add regression test for ciphersuite_cb() with empty list elements 2026-05-26 10:56:32 +02:00
ciphername_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
clienthellotest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cmactest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cmp_asn_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cmp_client_test.c cmp_client_test.c: fix partly too generous total_timeout limit for IR session with polling 2026-06-10 08:46:29 +02:00
cmp_ctx_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cmp_hdr_test.c Convert internal use of ASN1_STRING_set and ASN1_STRING_length 2026-07-18 15:01:13 +02:00
cmp_msg_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cmp_protect_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cmp_server_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cmp_status_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
cmp_vfy_test.c CMP: Optionally accept missing or non-matching transactionID or recipNonce values 2026-06-11 16:56:35 +02:00
cms-examples.pl
cmsapitest.c Add tests for CVE-2026-34182 2026-06-11 17:08:41 +02:00
conf_include_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
confdump.c
constant_time_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
context_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
crltest.c x509: add delta CRL success test 2026-07-03 21:22:21 +02:00
crypto_memcmp_test.c Add constant-time validation for CRYPTO_memcmp 2026-06-11 18:11:57 +02:00
ct_test.c Add CTLOG_STORE_add0_log() to add CTLOGs to a store programmatically 2026-03-19 21:45:33 +01:00
ctype_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
curve448_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
d2i_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
dane-cross.in
danetest.c Eliminate/fix repeated word usage 2026-07-08 12:07:53 +02:00
danetest.in
danetest.pem
data.bin
data2.bin
decap_out.bin Encap/decap in pkeyutl - tests 2024-08-13 11:03:11 +02:00
decoder_propq_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
default-and-fips.cnf Make the activate setting more intuitive 2023-12-21 09:22:40 -05:00
default-and-jitter.cnf jitter: add a new provider containing a jitter entropy source alone 2024-07-31 14:44:51 +10:00
default-and-legacy.cnf
default-for-evptest.cnf EVP_get_default_properties - tests 2024-09-16 08:15:52 +10:00
default-recordpadding.cnf Add test for recordpadding 2025-11-21 14:28:32 +01:00
default.cnf Make the activate setting more intuitive 2023-12-21 09:22:40 -05:00
defltfips_test.c fips: Bring back FIPS_mode() as a define 2026-06-18 07:58:10 -04:00
destest.c Eliminate unnecessary type casts of int constants 2026-07-08 12:09:47 +02:00
dhkem_test.inc Copyright year updates 2026-03-10 14:37:52 +00:00
dhtest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
drbgtest.c Remove internal-only DRBG_STATUS enum 2026-07-03 21:28:43 +02:00
dsa_no_digest_size_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
dsatest.c Fix broken hex data by reformatting 2026-06-03 09:46:03 +02:00
dtls12psk.c TEST: Add DTLS 1.2 coverage for Session ID verification 2026-06-30 13:00:49 +02:00
dtls_ccs_reorder_test.c Fix no-dtls1_2 test failure 2026-04-13 10:58:52 +02:00
dtls_mtu_test.c Use %zu for printing size_t values 2026-06-15 15:24:36 -04:00
dtlstest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
dtlsv1listentest.c Copyright year updates 2026-03-10 14:37:52 +00:00
ec_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ecdsatest.c Copyright year updates 2026-03-10 14:37:52 +00:00
ecdsatest.h 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ech_corrupt_test.c Reject unknown TLS 1.3 ServerHello extensions 2026-07-23 17:55:07 +02:00
ech_test.c Use %zu for printing size_t values 2026-06-15 15:24:36 -04:00
ecstresstest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ectest.c tests: Check the return value of BN_hex2bn() 2026-07-20 11:04:11 +02:00
encap_out.bin Encap/decap in pkeyutl - tests 2024-08-13 11:03:11 +02:00
encap_secret.bin Encap/decap in pkeyutl - tests 2024-08-13 11:03:11 +02:00
endecode_test.c LMS, DH: harden empty fromdata 2026-06-18 18:02:15 +10:00
endecoder_legacy_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
engine_stubs_test.c Add engine stubs test 2025-12-19 09:03:42 -05:00
errtest.c Copyright year updates 2026-03-10 14:37:52 +00:00
evp_byname_test.c evp_get_digest/cipherbyname_ex(): Try to fetch if not found 2024-07-31 11:25:55 +02:00
evp_extra_test.c Restore empty raw PKCS#1 verify-recover behavior 2026-07-24 15:06:51 +02:00
evp_extra_test2.c test: Invert bad TEST() condition calls 2026-06-15 09:38:43 +02:00
evp_fetch_prov_test.c Enforce mandatory cipher get_params at dispatch parse 2026-03-16 11:21:48 +00:00
evp_kdf_test.c test/evp_kdf_test.c: add checks or EVP_KDF_CTX_{,get0_,get1_}kdf() 2026-07-02 09:24:15 +02:00
evp_libctx_test.c Fix broken hex data by reformatting 2026-06-03 09:46:03 +02:00
evp_pkey_ctx_new_from_name.c
evp_pkey_dhkem_test.c Derive EC public key from private key if missing 2025-12-15 16:50:04 +01:00
evp_pkey_dparams_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
evp_pkey_provided_test.c Fix broken hex data by reformatting 2026-06-03 09:46:03 +02:00
evp_skey_test.c Fix broken hex data by reformatting 2026-06-03 09:46:03 +02:00
evp_test.c Add EVP_KDF_CTX_get0_kdf and EVP_KDF_CTX_get1_kdf, deprecate EVP_KDF_CTX_kdf 2026-07-02 09:24:15 +02:00
evp_xof_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
exdatatest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
exptest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ext_internal_test.c Implement RFC 8701 GREASE for TLS ClientHello 2026-03-17 10:57:59 -04:00
fake_cipherprov.c test: build the fake cipher provider as a loadable module 2026-07-13 16:58:43 +02:00
fake_cipherprov.h Enforce mandatory cipher get_params at dispatch parse 2026-03-16 11:21:48 +00:00
fake_pipelineprov.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
fake_pipelineprov.h test: add evp_extra_test case for cipher pipeline API with fake pipeline provider 2024-12-17 11:59:32 +00:00
fake_rsaprov.c Add a few more ASN.1 related StatementMacros 2025-12-17 10:19:43 -05:00
fake_rsaprov.h Fix EVP_PKEY_can_sign() handling of NULL from query_operation_name() 2025-09-25 15:27:12 +02:00
fatalerrtest.c Copyright year updates 2026-03-10 14:37:52 +00:00
ffc_internal_test.c test/ffc_internal_test.c: The ffc_params_copy_mfail test needs DSA enabled 2026-05-13 11:46:14 +02:00
filterprov.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
filterprov.h
fips-alt.cnf
fips-and-base.cnf
fips.cnf
fips_version_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
generate_buildtest.pl Copyright year updates 2025-09-02 13:05:45 +00:00
generate_ssl_tests.pl Copyright year updates 2025-03-12 13:35:59 +00:00
gmdifftest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
handshake-memfail.c test/{handshake-,load_key_certs_crls_,x509_}memfail.c: count allocs properly 2026-04-30 06:58:48 +00:00
hexstr_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
hmactest.c Copyright year updates 2026-03-10 14:37:52 +00:00
hpke_test.c test: Invert bad TEST() condition calls 2026-06-15 09:38:43 +02:00
http_test.c Remove parentheses around return arguments 2026-07-08 12:08:25 +02:00
ideatest.c Eliminate unnecessary type casts of int constants 2026-07-08 12:09:47 +02:00
igetest.c Move const qualifier after static 2026-07-08 12:10:36 +02:00
insta.priv.pem
insta_ca.cert.pem
invalid-x509.cnf Validate config options during x509 extension creation 2024-01-05 13:20:34 -05:00
json_test.c Fix macro staircase formatting issue 2026-06-10 15:24:43 +02:00
keymgmt_internal_test.c Constify return value of X509_get_X509_PUBKEY() 2025-12-23 08:16:37 -05:00
legacy.cnf
lhash_test.c Add mfail test for ossl_ht_free 2026-05-21 11:09:28 +02:00
libctx_config_test.c CONF: Add support for configurations per OSSL_LIB_CTX 2025-12-03 14:15:51 +01:00
list_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
lms.inc Add base code to load a LMS public key. 2025-07-10 19:03:46 +10:00
lms_common.inc Add base code to load a LMS public key. 2025-07-10 19:03:46 +10:00
lms_parse.py Add LMS evp_test using NIST ACVP test data. 2025-07-10 19:04:37 +10:00
lms_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
load_key_certs_crls_memfail.c test/{handshake-,load_key_certs_crls_,x509_}memfail.c: count allocs properly 2026-04-30 06:58:48 +00:00
localetest.c Constify the return value of X509_get0_pubkey_bitstr() 2025-12-23 08:06:00 -05:00
mdc2_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
mdc2test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
mem_alloc_custom_fns_test.c Disable clang format around .c includes 2025-12-03 14:40:56 +01:00
mem_alloc_test.c test/mem_alloc_test.c: fix my_malloc/my_realloc behaviour on size == 0 2026-05-18 09:30:43 +02:00
membio_test.c Fix of EOF and retry handling in BIO implementations 2026-01-22 18:12:13 +01:00
memleaktest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ml_dsa.inc Copyright year updates 2025-03-12 13:35:59 +00:00
ml_dsa_internal_test.c Add valgrind CT support to ML-DSA 2026-04-22 09:55:12 +02:00
ml_dsa_test.c Once initialised, ML-DSA keys should be immutable 2026-06-25 12:03:26 +10:00
ml_kem_evp_extra_test.c Once initialised, ML-DSA keys should be immutable 2026-06-25 12:03:26 +10:00
ml_kem_internal_test.c ml_kem: return an error on catastrophic failure in decap 2026-06-15 15:58:27 +02:00
mldsa_parse.py Left over doc TODOs 2025-02-14 10:50:59 +01:00
mldsa_wycheproof_parse.py ML-DSA Add Wycheproof test vectors. 2025-02-26 12:14:58 +01:00
mlkem_parse.py ML-KEM: Modify existing ML-KEM keygen tests to not use custom data. 2025-02-19 11:50:56 +01:00
modes_internal_test.c Use %zu for printing size_t values 2026-06-15 15:24:36 -04:00
moduleloadtest.c
namemap_internal_test.c Add various MFAIL tests to excercise ht insert 2026-05-11 10:21:48 +02:00
nocache-and-default.cnf This is a test for nocache provider behavior 2024-12-20 18:20:17 +01:00
nodefltctxtest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
null.cnf
ocspapitest.c Deprecate ASN1_BIT_STRING_set() 2026-04-26 13:45:20 +02:00
ocsptest.c x509: add ocsptest for the OCSP stapled-response verification path 2026-07-13 17:04:51 +02:00
ossl_store_test.c Add test for NULL uri handling in OSSL_STORE_delete() 2026-04-02 09:14:06 +02:00
p_minimal.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
p_ossltest.c test/p_ossltest: fix uninitialised bytes written in TLS1-AAD GCM mode 2026-07-20 11:06:53 +02:00
p_test.c providers/fips/fipsprov.c, test/p_test.c: remove c_gettable_params static global 2026-06-28 19:50:37 +02:00
packettest.c Copyright year updates 2026-03-10 14:37:52 +00:00
pairwise_fail_test.c FIPS: EC keygen - remove unnecessary self tests. 2026-07-13 16:46:54 +02:00
param_build_test.c OSSL_PARAM_BLD_push_octet_*(): Allow NULL buffer with 0 bsize 2026-04-13 09:47:42 +02:00
params_api_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
params_conversion_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
params_test.c Use %zu for printing size_t values 2026-06-15 15:24:36 -04:00
pathed.cnf Add test for OSSL_PROVIDER_load with module path set 2024-04-18 18:38:39 +02:00
pbelutest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
pbetest.c Add regression test for negative EVP_CIPHER_get_iv_length() in PKCS5_pbe2_set_scrypt 2026-07-20 13:15:11 +02:00
pem_read_depr_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
pemtest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
pkcs7-1.pem
pkcs7.pem
pkcs7_test.c Add parentheses around sizeof arguments 2026-07-08 12:10:14 +02:00
pkcs12_api_test.c test: Invert bad TEST() condition calls 2026-06-15 09:38:43 +02:00
pkcs12_format_test.c Fix broken hex data by reformatting 2026-06-03 09:46:03 +02:00
pkey_meth_kdf_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
pkits-test.pl
poly1305_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
priority_queue_test.c fix UB in priority_queue 2026-05-19 12:43:54 +02:00
property_test.c property: replace property_memfail with in-tree mfail tests 2026-07-08 15:05:01 +02:00
prov_config_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
provfetchtest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
provider_default_search_path_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
provider_fallback_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
provider_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
provider_internal_test.cnf.in
provider_pkey_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
provider_status_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
provider_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
proxy.cnf
punycode_test.c test: Invert bad TEST() condition calls 2026-06-15 09:38:43 +02:00
quic_ackm_test.c quic: reject ACK of an unsent packet number 2026-06-23 18:36:04 +02:00
quic_cc_test.c fix UB in priority_queue 2026-05-19 12:43:54 +02:00
quic_cfq_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
quic_client_test.c Remove parentheses around return arguments 2026-07-08 12:08:25 +02:00
quic_fc_test.c Make test/quic_fc_test.c clang-format friendly 2026-05-08 12:24:58 -04:00
quic_fifd_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
quic_lcidm_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
quic_memfail_test.c quic: Add MFAIL coverage for stream map allocation and token caching 2026-06-10 13:23:29 +02:00
quic_multistream_test.c Port script_19 to radix test framework 2026-07-21 11:22:31 +02:00
quic_newcid_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
quic_qlog_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
quic_rcidm_test.c quic: add mfail test for RCIDM 2026-06-30 10:56:41 +02:00
quic_record_test.c quic: add mfail test for multi-packet RXE 2026-06-30 10:55:57 +02:00
quic_record_test_util.h 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
quic_srt_gen_test.c test: drop no-cached-fetch mfail guards 2026-07-13 11:43:40 +02:00
quic_srtm_test.c quic: report SRTM entry match status via an output argument 2026-07-21 11:24:37 +02:00
quic_stream_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
quic_tserver_test.c quic: fix intermittent idle-test failure in tserver test 2026-07-10 17:33:40 +02:00
quic_txp_test.c Fix macro staircase formatting issue 2026-06-10 15:24:43 +02:00
quic_txpim_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
quic_wire_test.c Fix macro staircase formatting issue 2026-06-10 15:24:43 +02:00
quicapitest.c test: drop no-cached-fetch mfail guards 2026-07-13 11:43:40 +02:00
quicfaultstest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
rand_status_test.c
rand_test.c rand: fix jitter seed macro logic 2026-07-17 06:46:51 +02:00
rc2test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
rc4test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
rc5test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
rdcpu_sanitytest.c Move *_arch.h to include/arch 2026-05-10 11:53:33 +02:00
README-dev.md Additonal removals of engine references in tests/* 2025-12-04 07:31:06 -05:00
README-external.md Correct the instructions for how to run the krb5 external test. 2026-02-22 16:47:49 -05:00
README.md mfail: add sampled and count-only modes to test driver 2026-07-13 11:43:40 +02:00
README.ssltest.md Update documentation using enable-ssl3 Configure flags 2025-12-23 10:54:08 -05:00
recordlentest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
recursive.cnf Detect and prevent recursive config parsing 2023-12-21 13:38:31 -05:00
rio_notifier_test.c test: add Windows RIO notifier smoke test 2026-06-12 09:54:10 -04:00
rpktest.c ECDH and ECDSA cannot be really disabled standalone 2026-03-17 12:15:54 +01:00
rsa_complex.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
rsa_mp_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
rsa_sp800_56b_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
rsa_test.c test: drop no-cached-fetch mfail guards 2026-07-13 11:43:40 +02:00
rsa_x931_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
run_tests.pl test/run_tests.pl: return error if running a non-existent test 2026-06-26 18:38:15 +02:00
safe_math_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
sanitytest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
secmemtest.c test: Invert bad TEST() condition calls 2026-06-15 09:38:43 +02:00
serverinfo.pem
serverinfo2.pem
servername_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
sha3_x4_internal_test.c test: add SHAKE x4 internal cross-validation tests 2026-07-13 17:55:51 +02:00
sha_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
shibboleth.pfx
shlibloadtest.c Copyright year updates 2026-03-10 14:37:52 +00:00
simpledynamic.c Fix DSO symbol test with MINGW64 and pedantic warnings 2026-04-30 13:41:57 +02:00
simpledynamic.h 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
siphash_internal_test.c Fix broken hex data by reformatting 2026-06-03 09:46:03 +02:00
slh_dsa.inc Copyright year updates 2025-03-12 13:35:59 +00:00
slh_dsa_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
slhdsa_parse.py slhdsa: add Python script to convert NIST ACVP data to evp_test format 2025-02-20 11:17:40 +11:00
sm2_internal_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
sm3_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
sm4_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
smcont.bin
smcont.txt
smcont_zero.txt
sparse_array_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
srptest.c tests: Check the return value of BN_hex2bn() 2026-07-20 11:04:11 +02:00
ssl_cert_table_internal_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ssl_ctx_test.c Remove support for SSLv3 2025-12-23 10:54:06 -05:00
ssl_handshake_rtt_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ssl_old_test.c Removes some stale SSLv3 support around the code and updated documentation to reflect removal. 2026-06-30 13:04:17 +02:00
ssl_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ssl_test.tmpl
ssl_test_ctx_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
ssl_test_ctx_test.cnf
sslapitest.c PSK: Handle non-empty client sid_ctx 2026-07-21 16:11:36 +02:00
sslbuffertest.c Fix typos 2026-07-08 12:45:09 +02:00
sslcorrupttest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
stack_test.c Add stack test for thunked sorted lookup 2026-07-04 12:53:19 -04:00
statem_clnt_construct_test.c Fix missing NULL check in statem_clnt_construct_test 2026-07-23 10:24:01 +02:00
strtoultest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
sysdefaulttest.c ssl: Fix ssl_do_config to clean up errors on success with ERR_set_mark 2026-04-16 13:24:48 +02:00
test.cnf Remove unused crl_dir setting from config files 2026-06-03 13:36:56 +02:00
test_asn1_genconf.cnf Fix a possible crash in ASN1_generate_nconf 2026-01-08 11:13:25 +01:00
test_asn1_parse.cnf
test_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
testcrl.pem
testdsa.pem
testdsapub.pem
testec-p112r1.pem
testec-p256.pem
testec-sm2.pem fix SM2 privatekey decode(PEM format, ECPrivateKey). 2025-07-25 09:51:00 +02:00
testecpub-p256.pem
tested448.pem
tested448pub.pem
tested25519.pem
tested25519pub.pem
testmldsa44.pem dgst commandline support for one shot signing algorithms 2025-02-14 18:22:01 +01:00
testmldsa44pub.pem dgst commandline support for one shot signing algorithms 2025-02-14 18:22:01 +01:00
testmldsa65.pem dgst commandline support for one shot signing algorithms 2025-02-14 18:22:01 +01:00
testmldsa65pub.pem dgst commandline support for one shot signing algorithms 2025-02-14 18:22:01 +01:00
testmldsa87.pem dgst commandline support for one shot signing algorithms 2025-02-14 18:22:01 +01:00
testmldsa87pub.pem dgst commandline support for one shot signing algorithms 2025-02-14 18:22:01 +01:00
testp7.pem
testreq2.pem
testrsa.pem
testrsa2048.pem
testrsa2048pub.pem
testrsa_withattrs.der
testrsa_withattrs.pem
testrsapss.pem
testrsapssmandatory.pem
testrsapub.pem
testsid.pem
testutil.h mfail: add sampled and count-only modes to test driver 2026-07-13 11:43:40 +02:00
testx509.pem
threadpool_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
threadstest.c Fix typos 2026-07-08 12:45:09 +02:00
threadstest.h 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
threadstest_fips.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
time_offset_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
time_test.c
timing_load_creds.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
tls-max-v11.cnf CONF: Add support for configurations per OSSL_LIB_CTX 2025-12-03 14:15:51 +01:00
tls-max-v12.cnf CONF: Add support for configurations per OSSL_LIB_CTX 2025-12-03 14:15:51 +01:00
tls-provider.c Make sure we always check return of CRYPTO_UP_REF which can fail. 2026-07-20 13:13:57 +02:00
tls12psk.c Use %zu for printing size_t values 2026-06-15 15:24:36 -04:00
tls13ccstest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
tls13encryptiontest.c Removes unused args for new record layers. 2026-06-16 09:14:03 +02:00
tls13groupselection_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
tls13secretstest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
tls13tickettest.c test/tls13tickettest.c: check SSL_TICKET_NO_DECRYPT path in tls_parse_ctos_psk() 2026-05-26 17:20:47 +02:00
tls_groups_list_test.c Extend TLS group list parser test cases 2026-07-20 09:12:19 +02:00
trace_api_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
uitest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
upcallstest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
user_property_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
v3-cert1.pem
v3-cert2.pem
v3_ca_exts.cnf
v3ext.c crypto/x509: replace O(N^2) RFC 3779 canonicalisation merge with linear sweep 2026-07-03 21:19:51 +02:00
v3nametest.c Convert internal use of ASN1_STRING_set and ASN1_STRING_length 2026-07-18 15:01:13 +02:00
verify_extra_test.c test: Invert bad TEST() condition calls 2026-06-15 09:38:43 +02:00
versions.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
wpackettest.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
x509_acert_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
x509_check_cert_pkey_test.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00
x509_dup_cert_test.c Copyright year updates 2025-09-02 13:05:45 +00:00
x509_internal_test.c Convert internal use of ASN1_STRING_set and ASN1_STRING_length 2026-07-18 15:01:13 +02:00
x509_load_cert_file_test.c crypto/x509/x509_lu.c: fix memory leak in obj_ht_foreach_object() 2026-07-07 09:41:59 +02:00
x509_memfail.c test/{handshake-,load_key_certs_crls_,x509_}memfail.c: count allocs properly 2026-04-30 06:58:48 +00:00
x509_req_test.c Fix memory leak in x509_req_test 2024-06-25 16:09:22 +02:00
x509_test.c test: cover empty directoryName name constraints 2026-07-10 17:50:55 +02:00
x509_time_test.c Copyright year updates 2026-03-10 14:37:52 +00:00
x509aux.c 4.0-POST-CLANG-FORMAT-WEBKIT 2025-12-09 00:28:19 -07:00

Using OpenSSL Tests

After a successful build, and before installing, the libraries should be tested. Run:

$ make test                                      # Unix
$ mms test                                       ! OpenVMS
$ nmake test                                     # Windows

Warning: you MUST run the tests from an unprivileged account (or disable your privileges temporarily if your platform allows it).

If some tests fail, take a look at the section Test Failures below.

Test Failures

If some tests fail, look at the output. There may be reasons for the failure that isn't a problem in OpenSSL itself (like an OS malfunction or a Perl issue). You may want increased verbosity, that can be accomplished like this:

Full verbosity, showing full output of all successful and failed test cases (make macro VERBOSE or V):

$ make V=1 test                                  # Unix
$ mms /macro=(V=1) test                          ! OpenVMS
$ nmake V=1 test                                 # Windows

Verbosity on failed (sub-)tests only (VERBOSE_FAILURE or VF or REPORT_FAILURES):

$ make test VF=1

Verbosity on failed (sub-)tests, in addition progress on succeeded (sub-)tests (VERBOSE_FAILURE_PROGRESS or VFP or REPORT_FAILURES_PROGRESS):

$ make test VFP=1

If you want to run just one or a few specific tests, you can use the make variable TESTS to specify them, like this:

$ make TESTS='test_rsa test_dsa' test            # Unix
$ mms/macro="TESTS=test_rsa test_dsa" test       ! OpenVMS
$ nmake TESTS="test_rsa test_dsa" test           # Windows

And of course, you can combine (Unix examples shown):

$ make test TESTS='test_rsa test_dsa' VF=1
$ make test TESTS="test_cmp_*" VFP=1

You can find the list of available tests like this:

$ make list-tests                                # Unix
$ mms list-tests                                 ! OpenVMS
$ nmake list-tests                               # Windows

Have a look at the manual for the perl module Test::Harness to see what other HARNESS_* variables there are.

To report a bug please open an issue on GitHub, at https://github.com/openssl/openssl/issues.

For more details on how the make variables TESTS can be used, see section Running Selected Tests below.

Running Selected Tests

The make variable TESTS supports a versatile set of space separated tokens with which you can specify a set of tests to be performed. With a "current set of tests" in mind, initially being empty, here are the possible tokens:

 alltests      The current set of tests becomes the whole set of available
               tests (as listed when you do 'make list-tests' or similar).

 xxx           Adds the test 'xxx' to the current set of tests.

-xxx           Removes 'xxx' from the current set of tests.  If this is the
               first token in the list, the current set of tests is first
               assigned the whole set of available tests, effectively making
               this token equivalent to TESTS="alltests -xxx".

 nn            Adds the test group 'nn' (which is a number) to the current
               set of tests.

-nn            Removes the test group 'nn' from the current set of tests.
               If this is the first token in the list, the current set of
               tests is first assigned the whole set of available tests,
               effectively making this token equivalent to
               TESTS="alltests -xxx".

Also, all tokens except for "alltests" may have wildcards, such as *. (on Unix and Windows, BSD style wildcards are supported, while on VMS, it's VMS style wildcards)

Examples

Run all tests except for the fuzz tests:

$ make TESTS='-test_fuzz*' test

or, if you want to be explicit:

$ make TESTS='alltests -test_fuzz*' test

Run all tests that have a name starting with "test_ssl" but not those starting with "test_ssl_":

$ make TESTS='test_ssl* -test_ssl_*' test

Run only test group 10:

$ make TESTS='10' test

Run all tests except the slow group (group 99):

$ make TESTS='-99' test

Run all tests in test groups 80 to 99 except for tests in group 90:

$ make TESTS='[89]? -90' test

To run specific fuzz tests you can use for instance:

$ make test TESTS='test_fuzz_cmp test_fuzz_cms'

To stochastically verify that the algorithm that produces uniformly distributed random numbers is operating correctly (with a false positive rate of 0.01%):

$ ./util/wrap.sh test/bntest -stochastic

Running Tests in Parallel

By default the test harness will execute the selected tests sequentially. Depending on the platform characteristics, running more than one test job in parallel may speed up test execution. This can be requested by setting the HARNESS_JOBS environment variable to a positive integer value. This specifies the maximum number of test jobs to run in parallel.

Depending on the Perl version different strategies could be adopted to select which test recipes can be run in parallel. In recent versions of Perl, unless specified otherwise, any task can be run in parallel. Consult the documentation for TAP::Harness to know more.

To run up to four tests in parallel at any given time:

$ make HARNESS_JOBS=4 test

Random numbers in tests

Some tests use random numbers as part of the test. In some cases a test failure may occur for some random numbers, but not for others. The seed used for the rand number generator can be set via the OPENSSL_TEST_RAND_SEED environment variable. It can also be set via the OPENSSL_TEST_RAND_ORDER environment variable which additionally randomises the order tests are run in (see below).

When a test fails the test harness will display the seed used during the test (displaying either the OPENSSL_TEST_RAND_SEED or OPENSSL_TEST_RAND_ORDER environment variable value that must be used to recreate the results), e.g.

$ make OPENSSL_TEST_RAND_SEED=42 test

Randomisation of Test Ordering

By default, the test harness will execute tests in the order they were added. By setting the OPENSSL_TEST_RAND_ORDER environment variable to zero, the test ordering will be randomised. This additionally seeds the random number generator used within the tests as described in the section above. If a randomly ordered test fails, the seed value used will be reported. Setting the OPENSSL_TEST_RAND_ORDER environment variable to this value will rerun the tests in the same order and will also seed the test random number generator. This assures repeatability of randomly ordered test runs. This repeatability is independent of the operating system, processor or platform used.

To randomise the test ordering:

$ make OPENSSL_TEST_RAND_ORDER=0 test

To run the tests using the order defined by the random seed 42:

$ make OPENSSL_TEST_RAND_ORDER=42 test

Memory Allocation Failure Tests

Some tests use the ADD_MFAIL_TEST framework to exhaustively verify that functions handle every possible allocation failure gracefully. These tests run repeatedly, failing one allocation later each iteration. The ADD_MFAIL_NO_CHECK_TEST variant relaxes the requirement that the test return 0 when a failure was triggered. The ADD_MFAIL_ALL_TESTS and ADD_MFAIL_ALL_NO_CHECK_TESTS variants apply the same cycle to each index of a parameterised test, the same way ADD_ALL_TESTS does.

The ADD_MFAIL_SAMPLED_TEST(fn, cnt) variant (and its NO_CHECK and ALL forms) caps injection at cnt points: it injects at every allocation when there are at most cnt of them, and otherwise samples cnt points spread across the run. This keeps tests with very many allocations bounded. On no-cached-fetch builds, where allocation counts explode, non-sampled tests run the counting phase only and skip injection; sampled tests still run.

An mfail test returns 1 on success or 0 on failure; under NO_CHECK a 0 is tolerated since a function may legitimately fail when an allocation fails. Returning -1 forces a failure that is reported even under NO_CHECK, for assertions that must hold regardless of which allocation was made to fail.

Behavior is controlled with the following environment variables:

OPENSSL_TEST_MFAIL_DISABLE=1    Disable mfail custom allocator installation.

OPENSSL_TEST_MFAIL_SKIP_ALL=1   Skip all mfail tests.

OPENSSL_TEST_MFAIL_SKIP_SLOW=1  Skip mfail tests whose allocation count
                                exceeds the slow threshold.

OPENSSL_TEST_MFAIL_SLOW=N       Slow threshold (default 1000).

OPENSSL_TEST_MFAIL_COUNT=N      Override the sampled point count, taking
                                precedence over the per-test value.

OPENSSL_TEST_MFAIL_COUNT_ONLY=1 Run the counting phase only, never inject.

OPENSSL_TEST_MFAIL_POINT=N      Run only failure point N (0-indexed),
                                useful for debugging a specific failure.

OPENSSL_TEST_MFAIL_START=N      Start iteration from point N, skipping
                                earlier points that are already fixed.

OPENSSL_TEST_MFAIL_BACKTRACE=1  Print a backtrace at each injection point.

For example, to debug a failure at allocation point 42:

$ OPENSSL_TEST_MFAIL_POINT=42 ./test/crltest -test test_crl_diff_mfail

Or to skip already-fixed points and collect remaining failures:

$ OPENSSL_TEST_MFAIL_START=13 make TESTS=test_crl test

Running Tests under Valgrind

Normally, testing for memory leaks is accomplished by building Openssl with the enable-asan option, which links the library with the compiler asan library. However some people prefer to use valgrind to do dynamic instrumentation for memory leak checking. OpenSSL also offers a suppression file to suppress reachable memory leaks, that are often inappropriately considered to be true leaks. In order to maintain and test this suppression file, OpenSSL tests can be run under valgrind automatically.

To run the test suite under valgrind:

$ make OSSL_USE_VALGRIND=yes test

Doing so will create valgrind.log file for each test under the test-runs subdirectory.