A local copy of OpenSSL from GitHub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
David Lanzendörfer ca675cf79a Merge branch 'master' of https://github.com/openssl/openssl 4 weeks ago
..
certs test_pem_reading: Test loading a key from a file with multiple PEM data 3 months ago
ct Add config_diagnostics to our configuration files. 2 months ago
d2i-tests add test for CVE-2016-7053 5 years ago
helpers Merge branch 'master' of https://github.com/openssl/openssl 1 month ago
ocsp-tests Fix OCSP_basic_verify() cert chain construction in case bs->certs is NULL 4 years ago
recipes Add a test for running the config twice 4 weeks ago
smime-certs Add config_diagnostics to our configuration files. 2 months ago
ssl-tests Update copyright year 3 months ago
testutil test: add a shim function for the apps's opt_legacy_okay() function 3 months ago
CAtsa.cnf Add config_diagnostics to our configuration files. 2 months ago
README-dev.md Rename NOTES*, README*, VERSION, HACKING, LICENSE to .md or .txt 1 year ago
README-external.md Remove the external BoringSSL test 6 months ago
README.md test: document the random test ordering env variable 9 months ago
README.ssltest.md Move AllowClientRenegotiation tests 3 months ago
aborttest.c Following the license change, modify the boilerplates in test/ 3 years ago
acvp_test.c test: fix use after scope problem in ACVP test 2 months ago
acvp_test.inc Drop OPENSSL_NO_RSA everywhere 9 months ago
aesgcmtest.c Rename all getters to use get/get0 in name 4 months ago
afalgtest.c Update copyright year 2 months ago
algorithmid_test.c test: remove TODOs 4 months ago
asn1_decode_test.c Update copyright year 5 months ago
asn1_dsa_internal_test.c Update copyright year 12 months ago
asn1_encode_test.c Update copyright year 2 months ago
asn1_internal_test.c TEST: Check that i2d refuses to encode non-optional items with no content 3 months ago
asn1_string_table_test.c typo ANS1 -> ASN1 3 years ago
asn1_time_test.c Update copyright year 1 year ago
asynciotest.c test cleanup: move helper .c and .h files to test/helpers/ 10 months ago
asynctest.c Rename OPENSSL_CTX prefix to OSSL_LIB_CTX 12 months ago
bad_dtls_test.c Rename all getters to use get/get0 in name 4 months ago
bftest.c Update copyright year 1 year ago
bio_callback_test.c Update copyright year 3 months ago
bio_core_test.c BIO_new_from_core_bio: Fix heap-use-after-free after attach 3 months ago
bio_enc_test.c Following the license change, modify the boilerplates in test/ 3 years ago
bio_memleak_test.c Update copyright year 2 months ago
bio_prefix_text.c TEST: Add test recipe and help program to test BIO_f_prefix() 2 years ago
bio_readbuffer_test.c Fix DER reading from stdin for BIO_f_readbuffer 6 months ago
bioprinttest.c TEST: Adjust test/bioprinttest.c to behave like the testutil routines 1 year ago
bn_internal_test.c Update copyright year 7 months ago
bn_rand_range.h Test of uniformity of BN_rand_range output. 2 years ago
bntest.c OS/390: Broken detection 2 months ago
bntests.pl Following the license change, modify the boilerplates in test/ 3 years ago
build.info Add a test for running the config twice 4 weeks ago
ca-and-certs.cnf Add config_diagnostics to our configuration files. 2 months ago
casttest.c Update copyright year 1 year ago
chacha_internal_test.c Reorganize private crypto header files 2 years ago
cipher_overhead_test.c Update copyright year 7 months ago
cipherbytes_test.c Fix safestack issues in ssl.h 1 year ago
cipherlist_test.c Update copyright year 6 months ago
ciphername_test.c Fix safestack issues in ssl.h 1 year ago
clienthellotest.c Handle set_alpn_protos inputs better. 6 months ago
cmactest.c Add a CMAC test 1 year ago
cmp_asn_test.c test: remove TODOs 4 months ago
cmp_client_test.c Ensure libctx/propq is propagated when handling X509_REQ 4 months ago
cmp_ctx_test.c test_cmp_ctx: Avoid using empty X509 with i2d 3 months ago
cmp_hdr_test.c Work around a 32-bit mingw failure 3 months ago
cmp_msg_test.c Ensure libctx/propq is propagated when handling X509_REQ 4 months ago
cmp_protect_test.c Use the new ASN.1 libctx aware capabilities in CMP 4 months ago
cmp_server_test.c CMP: Add missing getter functions to CRMF API and CMP API 3 months ago
cmp_status_test.c Fix test code to not assume NUL terminated strings 1 month ago
cmp_vfy_test.c Use the new ASN.1 libctx aware capabilities in CMP 4 months ago
cms-examples.pl Following the license change, modify the boilerplates in test/ 3 years ago
cmsapitest.c Update copyright year 8 months ago
conf_include_test.c test: avoid memory leaks on errors 3 months ago
confdump.c Update copyright year 3 months ago
constant_time_test.c Reorganize local header files 2 years ago
context_internal_test.c Add the ability for ex_data to have a priority 5 months ago
crltest.c Fix safestack issues in x509.h 1 year ago
ct_test.c Fix safestack issues in ct.h 1 year ago
ctype_internal_test.c Reorganize private crypto header files 2 years ago
curve448_internal_test.c Update copyright year 6 months ago
d2i_test.c Update copyright year 1 year ago
danetest.c danetest.c: Improve code formatting 4 months ago
danetest.in Following the license change, modify the boilerplates in test/ 3 years ago
danetest.pem DANE support for X509_verify_cert() 6 years ago
data.bin TEST: Make our test data binary 10 months ago
data2.bin Remove the external BoringSSL test 6 months ago
default-and-fips.cnf Add config_diagnostics to our configuration files. 2 months ago
default-and-legacy.cnf Add config_diagnostics to our configuration files. 2 months ago
default.cnf Add config_diagnostics to our configuration files. 2 months ago
defltfips_test.c Add some testing for the case where the FIPS provider fails to load 2 months ago
destest.c test: add unit tests for TDES key wrap 1 month ago
dhtest.c dh_test: fix coverity 1473239 Argument cannot be negative (NEGATIVE_RETURNS) 3 months ago
drbgtest.c Rename all getters to use get/get0 in name 4 months ago
dsa_no_digest_size_test.c Update copyright year 1 year ago
dsatest.c dsatest: Properly detect failure in generate/sign/verify 2 months ago
dtls_mtu_test.c test cleanup: move helper .c and .h files to test/helpers/ 10 months ago
dtlstest.c Update copyright year 5 months ago
dtlsv1listentest.c Following the license change, modify the boilerplates in test/ 3 years ago
ec_internal_test.c Fix external symbols related to ec & sm2 keys 7 months ago
ecdsatest.c Rename all getters to use get/get0 in name 4 months ago
ecdsatest.h Fix header file include guard names 2 years ago
ecstresstest.c APPS & TEST: Use ossl_[u]intmax_t rather than [u]intmax_t 3 months ago
ectest.c Use <> for #include openssl/xxx 4 months ago
endecode_test.c Decoding PKCS#8: separate decoding of encrypted and unencrypted PKCS#8 4 months ago
endecoder_legacy_test.c test: fix coverity 1469427 Improper use of negative value (NEGATIVE_RETURNS) 3 months ago
enginetest.c Update copyright year 3 months ago
errtest.c err: clear flags better when clearing errors. 4 months ago
evp_extra_test.c EVP_DigestSign/VerifyFinal: Duplicate the pctx to allow multiple calls 1 month ago
evp_extra_test2.c Rename all getters to use get/get0 in name 4 months ago
evp_fetch_prov_test.c Rename all getters to use get/get0 in name 4 months ago
evp_kdf_test.c Add HKDF negative tests 3 months ago
evp_libctx_test.c Add a gettable for provider ciphers to return the EVP_CIPH_RAND_KEY flag 4 months ago
evp_pkey_dparams_test.c Add necessary checks of OPENSSL_NO_DH, OPENSSL_NO_DSA and OPENSSL_NO_EC 9 months ago
evp_pkey_provided_test.c Add tests for EVP_PKEY_get_utf8_string_param(), both positive and negative 1 month ago
evp_test.c evp_test: use correct size in memory clear 3 months ago
exdatatest.c Update copyright year 6 months ago
exptest.c Update copyright year 6 months ago
fatalerrtest.c test cleanup: move helper .c and .h files to test/helpers/ 10 months ago
ffc_internal_test.c Update copyright year 7 months ago
filterprov.c provider: add an unquery function to allow providers to clean up. 7 months ago
filterprov.h provider: add an unquery function to allow providers to clean up. 7 months ago
fips-alt.cnf Add some testing for the case where the FIPS provider fails to load 2 months ago
fips-and-base.cnf Add config_diagnostics to our configuration files. 2 months ago
fips.cnf Add config_diagnostics to our configuration files. 2 months ago
generate_buildtest.pl Following the license change, modify the boilerplates in test/ 3 years ago
generate_ssl_tests.pl Update copyright year 3 months ago
gmdifftest.c Reduce the runtime/output from the gmdiff test 5 months ago
hexstr_test.c Update copyright year 6 months ago
hmactest.c test: check for NULL returns better 3 months ago
http_test.c Add OSSL_ prefix to HTTP_DEFAULT_MAX_{LINE_LENGTH,RESP_LEN} 4 months ago
ideatest.c Update copyright year 1 year ago
igetest.c Deprecate the AES_ige_*() functions 2 years ago
insta.priv.pem Chunk 11 of CMP contribution to OpenSSL: CMP command-line interface 1 year ago
insta_ca.cert.pem Chunk 11 of CMP contribution to OpenSSL: CMP command-line interface 1 year ago
keymgmt_internal_test.c Update copyright year 6 months ago
legacy.cnf Add config_diagnostics to our configuration files. 2 months ago
lhash_test.c Update copyright year 12 months ago
mdc2_internal_test.c Update copyright year 1 year ago
mdc2test.c Update copyright year 1 year ago
memleaktest.c Update copyright year 5 months ago
modes_internal_test.c Update copyright year 6 months ago
moduleloadtest.c Update copyright year 6 months ago
namemap_internal_test.c Update copyright year 6 months ago
ocspapitest.c Fix safestack issues in x509.h 1 year ago
ossl_store_test.c test/ossl_store_test.c: Adapt the use of datadir for VMS paths 3 months ago
p_test.c Ensure mirroring of properties works for subsequent updates 4 months ago
packettest.c Make the PACKET/WPACKET code available to both libcrypto and libssl 2 years ago
param_build_test.c Use <> for #include openssl/xxx 4 months ago
params_api_test.c Add OSSL_PARAM_dup() and OSSL_PARAM_merge(). 6 months ago
params_conversion_test.c Merge branch 'master' of https://github.com/openssl/openssl 1 month ago
params_test.c test: check for NULL returns better 3 months ago
pbelutest.c Following the license change, modify the boilerplates in test/ 3 years ago
pbetest.c Fix building of test/pbetest.c 4 months ago
pem_read_depr_test.c Update copyright year 2 months ago
pemtest.c Update copyright year 2 months ago
pkcs7-1.pem Import of old SSLeay release: SSLeay 0.8.1b 23 years ago
pkcs7.pem Import of old SSLeay release: SSLeay 0.8.1b 23 years ago
pkcs7_test.c Fix PKCS7_verify to not have an error stack if it succeeds. 4 months ago
pkcs12_format_test.c Fix PKCS12_create() so that a fetch error is not added to the error stack. 4 months ago
pkey_meth_kdf_test.c Update copyright year 12 months ago
pkey_meth_test.c Update copyright year 1 year ago
pkits-test.pl Following the license change, modify the boilerplates in test/ 3 years ago
poly1305_internal_test.c Add ChaCha related ciphers to default provider 2 years ago
property_test.c property: convert integers to strings properly. 4 months ago
prov_config_test.c Add a test for running the config twice 4 weeks ago
provfetchtest.c Add a test to check that RAND_bytes_ex() works with a child lib ctx 3 months ago
provider_fallback_test.c Update copyright year 3 months ago
provider_internal_test.c Merge ossl_provider_activate() and ossl_provider_activate_child() 3 months ago
provider_internal_test.cnf.in Add config_diagnostics to our configuration files. 2 months ago
provider_status_test.c Add test for provider gettables 3 months ago
provider_test.c Ensure mirroring of properties works for subsequent updates 4 months ago
proxy.cnf Add config_diagnostics to our configuration files. 2 months ago
rand_status_test.c rand: instantiate the DRBGs upon first use. 1 year ago
rc2test.c Update copyright year 1 year ago
rc4test.c Update copyright year 1 year ago
rc5test.c Update copyright year 1 year ago
rdrand_sanitytest.c Remove extern declarations of OPENSSL_ia32cap_P 2 years ago
recordlentest.c Update copyright year 7 months ago
rsa_complex.c Following the license change, modify the boilerplates in test/ 3 years ago
rsa_mp_test.c Drop OPENSSL_NO_RSA everywhere 9 months ago
rsa_sp800_56b_test.c Allow small RSA exponents in the default provider 1 month ago
rsa_test.c Fix use of uninitialized memory in test_rsa_oaep 3 months ago
run_tests.pl Fix exit code for VMS in util/wrap.pl and test/run_tests.pl 3 months ago
sanitytest.c Update copyright year 2 months ago
secmemtest.c Update copyright year 1 year ago
serverinfo.pem Require ServerInfo PEMs to be named "BEGIN SERVERINFO FOR"... 8 years ago
serverinfo2.pem Add a SERVERINFOV2 format test file 4 years ago
servername_test.c test: fix coverity 1451534: improper use of negative value 6 months ago
session.pem Don't store the ticket nonce in the session 3 years ago
sha_test.c test: add test cases for SHAxxx helper functions 3 months ago
shibboleth.pfx Add PKCS#12 UTF-8 interoperability test. 5 years ago
shlibloadtest.c Update copyright year 6 months ago
simpledynamic.c Update copyright year 2 months ago
simpledynamic.h TEST: Modify simpledynamic.[ch] to allow use on VMS as well 3 months ago
siphash_internal_test.c Update copyright year 6 months ago
sm2_internal_test.c Correctly calculate the length of SM2 plaintext given the ciphertext 1 month ago
sm3_internal_test.c sm3: fix function names after the big ossl_ prefix addition. 3 months ago
sm4_internal_test.c Update copyright year 6 months ago
smcont.bin apps/cms.c: Correct -sign output and -verify input with -binary 4 months ago
smcont.txt test/smcont.txt: trigger assertion in bio_enc.c. 5 years ago
smcont_zero.txt Tests for processing zero-length content in SMIME format 12 months ago
sparse_array_test.c Update copyright year 3 months ago
srptest.c Update copyright year 7 months ago
ssl_cert_table_internal_test.c Update copyright year 6 months ago
ssl_ctx_test.c Update copyright year 1 year ago
ssl_old_test.c test: remove TODOs 4 months ago
ssl_test.c Add SSL_OP_ALLOW_CLIENT_RENEGOTIATION 4 months ago
ssl_test.tmpl test/ssl_test.tmpl: make it work with elderly perl. 5 years ago
ssl_test_ctx_test.c test cleanup: move helper .c and .h files to test/helpers/ 10 months ago
ssl_test_ctx_test.cnf Use .cnf for config files, not .conf 2 years ago
sslapitest.c Fix state name abbreviation 1 month ago
sslbuffertest.c test cleanup: move helper .c and .h files to test/helpers/ 10 months ago
sslcorrupttest.c test cleanup: move helper .c and .h files to test/helpers/ 10 months ago
stack_test.c Update copyright year 7 months ago
sysdefault.cnf Add oid_section to sysdefault.cnf to test adding new oids 2 months ago
sysdefaulttest.c Following the license change, modify the boilerplates in test/ 3 years ago
test.cnf TEST: Prefer using precomputed RSA and DH keys for more efficient tests 4 months ago
test_test.c Fix --strict-warnings build 2 years ago
testcrl.pem Import of old SSLeay release: SSLeay 0.8.1b 23 years ago
testdsa.pem Add private/public key conversion tests 7 years ago
testdsapub.pem Add private/public key conversion tests 7 years ago
testec-p256.pem Add private/public key conversion tests 7 years ago
testecpub-p256.pem Add private/public key conversion tests 7 years ago
tested448.pem More testing for CLI usage of Ed25519 and Ed448 keys 2 years ago
tested448pub.pem More testing for CLI usage of Ed25519 and Ed448 keys 2 years ago
tested25519.pem More testing for CLI usage of Ed25519 and Ed448 keys 2 years ago
tested25519pub.pem More testing for CLI usage of Ed25519 and Ed448 keys 2 years ago
testp7.pem Change PKCS#7 test data to take account of removal of 21 years ago
testreq2.pem Import of old SSLeay release: SSLeay 0.8.1b 23 years ago
testrsa.pem Support writing RSA keys using the traditional format again 1 year ago
testrsa2048.pem Add fips checks for rsa encryption 1 year ago
testrsa_withattrs.der Tests for creating req from PKCS8 keys with extra attrs 5 months ago
testrsa_withattrs.pem Tests for creating req from PKCS8 keys with extra attrs 5 months ago
testrsapss.pem rsa_kmgmt: Return OSSL_PKEY_PARAM_DEFAULT_DIGEST for unrestricted PSS keys 8 months ago
testrsapssmandatory.pem RSA: properly generate algorithm identifier for RSA-PSS signatures 8 months ago
testrsapub.pem Add private/public key conversion tests 7 years ago
testsid.pem Regenerate testsid.pem 4 months ago
testutil.h Ensure libctx/propq is propagated when handling X509_REQ 4 months ago
testx509.pem Extend X509 cert checks and error reporting in v3_{purp,crld}.c and x509_{set,vfy}.c 1 year ago
threadstest.c test: fix test ordering in threads test 3 months ago
threadstest.h test: add test case to reliably reproduce RAND leak during POST 4 months ago
threadstest_fips.c test: add test case to reliably reproduce RAND leak during POST 4 months ago
time_offset_test.c Following the license change, modify the boilerplates in test/ 3 years ago
tls-provider.c test: add zero strenght arguments to BN and RAND RNG calls 4 months ago
tls13ccstest.c test cleanup: move helper .c and .h files to test/helpers/ 10 months ago
tls13encryptiontest.c Update copyright year 3 months ago
tls13secretstest.c Rename all getters to use get/get0 in name 4 months ago
uitest.c Update copyright year 12 months ago
upcallstest.c Add a test for the newly added OBJ upcalls 3 months ago
user_property_test.c property: add test case for setting default user properties before fetching 5 months ago
v3-cert1.pem Import of old SSLeay release: SSLeay 0.8.1b 23 years ago
v3-cert2.pem Import of old SSLeay release: SSLeay 0.8.1b 23 years ago
v3_ca_exts.cnf make various test CA certs RFC 5280 compliant w.r.t. X509 extensions 8 months ago
v3ext.c Update copyright year 1 year ago
v3nametest.c OS/390: Broken detection 2 months ago
verify_extra_test.c Improve ossl_cmp_build_cert_chain(); publish it as X509_build_chain() 5 months ago
versions.c Following the license change, modify the boilerplates in test/ 3 years ago
wpackettest.c WPACKET: don't write DER length when we don't want to 1 year ago
x509_check_cert_pkey_test.c Update copyright year 5 months ago
x509_dup_cert_test.c Update copyright year 1 year ago
x509_internal_test.c Fix test case for a2i_IPADDRESS 2 months ago
x509_time_test.c Fix test code to not assume NUL terminated strings 1 month ago
x509aux.c Update copyright year 8 months ago

README.md

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

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. 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. 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