Pauli 304d070eba deprecate engine tests vor 4 Jahren
..
certs 0e7b1383e1 Fix issue 1418 by moving check of KU_KEY_CERT_SIGN and weakening check_issued() vor 4 Jahren
ct 433deaffce Use .cnf for config files, not .conf vor 4 Jahren
d2i-tests a378a46985 add test for CVE-2016-7053 vor 7 Jahren
ocsp-tests 121738d1cb Fix OCSP_basic_verify() cert chain construction in case bs->certs is NULL vor 7 Jahren
ossl_shim 8c2bfd2512 Add SSL_get[01]_peer_certificate() vor 4 Jahren
recipes 5744dacb3a Make -provider_name and -section_name optional vor 4 Jahren
smime-certs 23f3993127 Remove RANDFILE settings from configuration files vor 4 Jahren
ssl-tests aba03ae571 Reduce the security bits for MD5 and SHA1 based signatures in TLS vor 4 Jahren
testutil fbd2ece171 Update copyright year vor 4 Jahren
CAtsa.cnf 23f3993127 Remove RANDFILE settings from configuration files vor 4 Jahren
README-dev.md 036cbb6bbf Rename NOTES*, README*, VERSION, HACKING, LICENSE to .md or .txt vor 4 Jahren
README-external.md 1dc1ea182b Fix many MarkDown issues in {NOTES*,README*,HACKING,LICENSE}.md files vor 4 Jahren
README.md 036cbb6bbf Rename NOTES*, README*, VERSION, HACKING, LICENSE to .md or .txt vor 4 Jahren
README.ssltest.md 257e9d03b0 Fix issues reported by markdownlint vor 4 Jahren
aborttest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
acvp_test.c 023b188ca5 Make EVP_PKEY_CTX_[get|set]_group_name work for DH too vor 4 Jahren
acvp_test.inc 4f2271d58a Add ACVP fips module tests vor 4 Jahren
aesgcmtest.c 454afd9866 Update copyright year vor 4 Jahren
afalgtest.c 304d070eba deprecate engine tests vor 4 Jahren
asn1_decode_test.c 936c2b9e93 Update source files for deprecation at 3.0 vor 4 Jahren
asn1_dsa_internal_test.c 25f2138b0a Reorganize private crypto header files vor 5 Jahren
asn1_encode_test.c 936c2b9e93 Update source files for deprecation at 3.0 vor 4 Jahren
asn1_internal_test.c 25f2138b0a Reorganize private crypto header files vor 5 Jahren
asn1_string_table_test.c 275a7b9e5e typo ANS1 -> ASN1 vor 5 Jahren
asn1_time_test.c 33388b44b6 Update copyright year vor 4 Jahren
asynciotest.c 33388b44b6 Update copyright year vor 4 Jahren
asynctest.c 92db29e5e8 Add a test to make sure ASYNC aware code gets the right default libctx vor 4 Jahren
bad_dtls_test.c d9c2fd51e2 The EVP_MAC functions have been renamed for consistency. The EVP_MAC_CTX_* vor 4 Jahren
bftest.c 33388b44b6 Update copyright year vor 4 Jahren
bio_callback_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
bio_enc_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
bio_memleak_test.c 454afd9866 Update copyright year vor 4 Jahren
bio_prefix_text.c 51a7c4b5f2 TEST: Add test recipe and help program to test BIO_f_prefix() vor 4 Jahren
bioprinttest.c c4683009ad TEST: Adjust test/bioprinttest.c to behave like the testutil routines vor 4 Jahren
bn_internal_test.c 454afd9866 Update copyright year vor 4 Jahren
bn_rand_range.h 5d2f3e4a6c Test of uniformity of BN_rand_range output. vor 5 Jahren
bntest.c 79c44b4e30 Fix some typos vor 4 Jahren
bntests.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
build.info 63794b048c Add multiple fixes for ffc key generation using invalid p,q,g parameters. vor 4 Jahren
ca-and-certs.cnf 4e6e57cfcd Cleanup cert config files for tests vor 4 Jahren
casttest.c 33388b44b6 Update copyright year vor 4 Jahren
chacha_internal_test.c 25f2138b0a Reorganize private crypto header files vor 5 Jahren
cipher_overhead_test.c 706457b7bd Reorganize local header files vor 5 Jahren
cipherbytes_test.c 454afd9866 Update copyright year vor 4 Jahren
cipherlist_test.c 454afd9866 Update copyright year vor 4 Jahren
ciphername_test.c 852c2ed260 In OpenSSL builds, declare STACK for datatypes ... vor 4 Jahren
clienthellotest.c 33388b44b6 Update copyright year vor 4 Jahren
cmactest.c a370ff8daa Add a CMAC test vor 4 Jahren
cmp_asn_test.c 3dbc5156b0 chunk 6 of CMP contribution to OpenSSL vor 4 Jahren
cmp_client_test.c 430efff1b9 Improve ossl_cmp_msg_check_received() and rename to ossl_cmp_msg_check_update() vor 4 Jahren
cmp_ctx_test.c 63f1883dca Rename OSSL_CMP_CTX_set1_clCert() to OSSL_CMP_CTX_set1_cert() vor 4 Jahren
cmp_hdr_test.c 852c2ed260 In OpenSSL builds, declare STACK for datatypes ... vor 4 Jahren
cmp_msg_test.c 63f1883dca Rename OSSL_CMP_CTX_set1_clCert() to OSSL_CMP_CTX_set1_cert() vor 4 Jahren
cmp_protect_test.c 63f1883dca Rename OSSL_CMP_CTX_set1_clCert() to OSSL_CMP_CTX_set1_cert() vor 4 Jahren
cmp_server_test.c 62dcd2aa17 Chunk 8 of CMP contribution to OpenSSL: CMP server and cmp_mock_srv.c for testing vor 4 Jahren
cmp_status_test.c 852c2ed260 In OpenSSL builds, declare STACK for datatypes ... vor 4 Jahren
cmp_testlib.c 852c2ed260 In OpenSSL builds, declare STACK for datatypes ... vor 4 Jahren
cmp_testlib.h 33388b44b6 Update copyright year vor 4 Jahren
cmp_vfy_test.c be7f84e2e2 Disable tests in cmp_vfy_test.c that make no sense if FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION vor 4 Jahren
cms-examples.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
cmsapitest.c a6ed19dc9a Amend references to "OpenSSL license" vor 4 Jahren
conf_include_test.c 23f3993127 Remove RANDFILE settings from configuration files vor 4 Jahren
confdump.c 454afd9866 Update copyright year vor 4 Jahren
constant_time_test.c 706457b7bd Reorganize local header files vor 5 Jahren
context_internal_test.c 1aedc35fd6 Instead of global data store it in an OPENSSL_CTX vor 5 Jahren
crltest.c 454afd9866 Update copyright year vor 4 Jahren
ct_test.c 852c2ed260 In OpenSSL builds, declare STACK for datatypes ... vor 4 Jahren
ctype_internal_test.c 25f2138b0a Reorganize private crypto header files vor 5 Jahren
curve448_internal_test.c 33388b44b6 Update copyright year vor 4 Jahren
d2i_test.c 33388b44b6 Update copyright year vor 4 Jahren
danetest.c 852c2ed260 In OpenSSL builds, declare STACK for datatypes ... vor 4 Jahren
danetest.in 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
danetest.pem 170b735820 DANE support for X509_verify_cert() vor 8 Jahren
data.txt 036cbb6bbf Rename NOTES*, README*, VERSION, HACKING, LICENSE to .md or .txt vor 4 Jahren
data2.txt 036cbb6bbf Rename NOTES*, README*, VERSION, HACKING, LICENSE to .md or .txt vor 4 Jahren
default-and-fips.cnf 1cd2c1f857 Update some nits around the FIPS module vor 4 Jahren
default-and-legacy.cnf e2f72313cc test/recipes/30-test_evp.t: Modify to test with different providers vor 5 Jahren
default.cnf e2f72313cc test/recipes/30-test_evp.t: Modify to test with different providers vor 5 Jahren
destest.c 33388b44b6 Update copyright year vor 4 Jahren
dhtest.c 33388b44b6 Update copyright year vor 4 Jahren
drbg_cavs_data.h ae4186b004 Fix header file include guard names vor 5 Jahren
drbg_cavs_data_ctr.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
drbg_cavs_data_hash.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
drbg_cavs_data_hmac.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
drbg_cavs_test.c 454afd9866 Update copyright year vor 4 Jahren
drbg_extra_test.c 437e36aed5 coverity 1462562 Dereference before null check vor 4 Jahren
drbg_extra_test.h a6ed19dc9a Amend references to "OpenSSL license" vor 4 Jahren
drbgtest.c ce3080e931 DRBG: rename the DRBG taxonomy. vor 4 Jahren
drbgtest.h 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
dsa_no_digest_size_test.c 33388b44b6 Update copyright year vor 4 Jahren
dsatest.c 023b188ca5 Make EVP_PKEY_CTX_[get|set]_group_name work for DH too vor 4 Jahren
dtls_mtu_test.c 454afd9866 Update copyright year vor 4 Jahren
dtlstest.c 33388b44b6 Update copyright year vor 4 Jahren
dtlsv1listentest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
ec_internal_test.c 33388b44b6 Update copyright year vor 4 Jahren
ecdsatest.c f844f9eb44 Rename FIPS_MODE to FIPS_MODULE vor 4 Jahren
ecdsatest.h ae4186b004 Fix header file include guard names vor 5 Jahren
ecstresstest.c dd6b270618 Remove tab characters from C source files. vor 5 Jahren
ectest.c a01cae99ac [test] ectest: check custom generators vor 4 Jahren
enginetest.c 304d070eba deprecate engine tests vor 4 Jahren
errtest.c 17b7f89684 TEST: fix test/errtest.c vor 4 Jahren
evp_extra_test.c e2cc68c8fd Fix CID 1465213: Integer handling issues (evp_extra_test.c) vor 4 Jahren
evp_extra_test2.c e31eda006f TEST: Add test to exercise OPENSSL_CTX_set0_default() vor 4 Jahren
evp_fetch_prov_test.c 33388b44b6 Update copyright year vor 4 Jahren
evp_kdf_test.c fbd2ece171 Update copyright year vor 4 Jahren
evp_libctx_test.c 63794b048c Add multiple fixes for ffc key generation using invalid p,q,g parameters. vor 4 Jahren
evp_pkey_dparams_test.c 10c25644e3 EC only uses approved curves in FIPS mode. vor 5 Jahren
evp_pkey_provided_test.c fd7d574dd9 Fix CID 1465215 : Explicit null dereferenced (in test) vor 4 Jahren
evp_test.c 7cc355c2e4 Add AES_CBC_CTS ciphers to providers vor 4 Jahren
evp_test.h 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
exdatatest.c 00c405b365 Update copyright year vor 4 Jahren
exptest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
fatalerrtest.c 33388b44b6 Update copyright year vor 4 Jahren
ffc_internal_test.c 63794b048c Add multiple fixes for ffc key generation using invalid p,q,g parameters. vor 4 Jahren
filterprov.c 363b1e5dae Make the naming scheme for dispatched functions more consistent vor 4 Jahren
fips.cnf 1cd2c1f857 Update some nits around the FIPS module vor 4 Jahren
generate_buildtest.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
generate_ssl_tests.pl 33388b44b6 Update copyright year vor 4 Jahren
gmdifftest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
gosttest.c 5e30f2fd58 Use a non-default libctx in sslapitest vor 4 Jahren
handshake_helper.c 8c2bfd2512 Add SSL_get[01]_peer_certificate() vor 4 Jahren
handshake_helper.h ae4186b004 Fix header file include guard names vor 5 Jahren
hexstr_test.c f32af93c92 Fix ERR_print_errors so that it matches the documented format in doc/man3/ERR_error_string.pod vor 4 Jahren
hmactest.c 33388b44b6 Update copyright year vor 4 Jahren
http_test.c 852c2ed260 In OpenSSL builds, declare STACK for datatypes ... vor 4 Jahren
ideatest.c 33388b44b6 Update copyright year vor 4 Jahren
igetest.c 7573fe1af5 Deprecate the AES_ige_*() functions vor 4 Jahren
insta.priv.pem 8d9a4d833f Chunk 11 of CMP contribution to OpenSSL: CMP command-line interface vor 4 Jahren
insta_ca.cert.pem 8d9a4d833f Chunk 11 of CMP contribution to OpenSSL: CMP command-line interface vor 4 Jahren
keymgmt_internal_test.c 33388b44b6 Update copyright year vor 4 Jahren
legacy.cnf e2f72313cc test/recipes/30-test_evp.t: Modify to test with different providers vor 5 Jahren
lhash_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
mdc2_internal_test.c 33388b44b6 Update copyright year vor 4 Jahren
mdc2test.c 33388b44b6 Update copyright year vor 4 Jahren
memleaktest.c ea7a952c8a test/memleaktest.c: Modify for use with address/leak sanitizer vor 4 Jahren
modes_internal_test.c 33388b44b6 Update copyright year vor 4 Jahren
namemap_internal_test.c c720fc35f4 namemap: change ossl_namemap_empty() to do what the documentation says. vor 4 Jahren
ocspapitest.c 852c2ed260 In OpenSSL builds, declare STACK for datatypes ... vor 4 Jahren
p_test.c 363b1e5dae Make the naming scheme for dispatched functions more consistent vor 4 Jahren
packettest.c 0d345f0e10 Make the PACKET/WPACKET code available to both libcrypto and libssl vor 5 Jahren
param_build_test.c 5fdaa38feb params: add OSSL_PARAM helpers for time_t. vor 4 Jahren
params_api_test.c e23d850ff3 Add and use internal header that implements endianness check vor 4 Jahren
params_conversion_test.c 33388b44b6 Update copyright year vor 4 Jahren
params_test.c 33388b44b6 Update copyright year vor 4 Jahren
pbelutest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
pemtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
pkcs7-1.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b vor 26 Jahren
pkcs7.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b vor 26 Jahren
pkey_meth_kdf_test.c 5a285addbf Added new EVP/KDF API. vor 5 Jahren
pkey_meth_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
pkits-test.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
poly1305_internal_test.c 3d5a7578e0 Add ChaCha related ciphers to default provider vor 5 Jahren
property_test.c 454afd9866 Update copyright year vor 4 Jahren
provider_fallback_test.c f995e5bdcd TEST: Add provider_fallback_test, to test aspects of fallback providers vor 4 Jahren
provider_internal_test.c 29dc6e00f2 Load the config file by default vor 5 Jahren
provider_internal_test.cnf.in 433deaffce Use .cnf for config files, not .conf vor 4 Jahren
provider_test.c 4e7991b497 Change OSSL_PARAM return size to not be a pointer. vor 5 Jahren
proxy.cnf 4e6e57cfcd Cleanup cert config files for tests vor 4 Jahren
rc2test.c 33388b44b6 Update copyright year vor 4 Jahren
rc4test.c 33388b44b6 Update copyright year vor 4 Jahren
rc5test.c 33388b44b6 Update copyright year vor 4 Jahren
rdrand_sanitytest.c 24fd8541d4 Remove extern declarations of OPENSSL_ia32cap_P vor 5 Jahren
recordlentest.c 33388b44b6 Update copyright year vor 4 Jahren
rsa_complex.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
rsa_mp_test.c 33388b44b6 Update copyright year vor 4 Jahren
rsa_sp800_56b_test.c 4f2271d58a Add ACVP fips module tests vor 4 Jahren
rsa_test.c 33388b44b6 Update copyright year vor 4 Jahren
run_tests.pl 94fcec0902 test/run_tests.pl: Add alias REPORT_FAILURES{,_PROGRESS} for VF and VFP vor 4 Jahren
sanitytest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
secmemtest.c 33388b44b6 Update copyright year vor 4 Jahren
serverinfo.pem c655f40ed2 Require ServerInfo PEMs to be named "BEGIN SERVERINFO FOR"... vor 11 Jahren
serverinfo2.pem b878afae4b Add a SERVERINFOV2 format test file vor 7 Jahren
servername_test.c 33388b44b6 Update copyright year vor 4 Jahren
session.pem 6cf2dbd9fa Don't store the ticket nonce in the session vor 6 Jahren
shibboleth.pfx 70bf33d182 Add PKCS#12 UTF-8 interoperability test. vor 8 Jahren
shlibloadtest.c 50cd4768c6 Reorganize public header files (part 1) vor 5 Jahren
siphash_internal_test.c 25f2138b0a Reorganize private crypto header files vor 5 Jahren
sm2_internal_test.c 33388b44b6 Update copyright year vor 4 Jahren
sm4_internal_test.c 25f2138b0a Reorganize private crypto header files vor 5 Jahren
smcont.txt 382bb0b294 test/smcont.txt: trigger assertion in bio_enc.c. vor 8 Jahren
sparse_array_test.c 25f2138b0a Reorganize private crypto header files vor 5 Jahren
srptest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
ssl_cert_table_internal_test.c 706457b7bd Reorganize local header files vor 5 Jahren
ssl_ctx_test.c 454afd9866 Update copyright year vor 4 Jahren
ssl_test.c 852c2ed260 In OpenSSL builds, declare STACK for datatypes ... vor 4 Jahren
ssl_test.tmpl f4941736a9 test/ssl_test.tmpl: make it work with elderly perl. vor 8 Jahren
ssl_test_ctx.c cd4afec69f Add a test for renegotiation with EXTMS dropped vor 4 Jahren
ssl_test_ctx.h fbd2ece171 Update copyright year vor 4 Jahren
ssl_test_ctx_test.c 33388b44b6 Update copyright year vor 4 Jahren
ssl_test_ctx_test.cnf 433deaffce Use .cnf for config files, not .conf vor 4 Jahren
sslapitest.c 8c2bfd2512 Add SSL_get[01]_peer_certificate() vor 4 Jahren
sslbuffertest.c 33388b44b6 Update copyright year vor 4 Jahren
sslcorrupttest.c 09ce6e0854 Ensure the sslcorrupttest checks all errors on the queue vor 4 Jahren
ssltest_old.c 8c2bfd2512 Add SSL_get[01]_peer_certificate() vor 4 Jahren
ssltestlib.c 0d52ede716 Fix error path in int create_ssl_ctx_pair() vor 4 Jahren
ssltestlib.h 33388b44b6 Update copyright year vor 4 Jahren
stack_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
sysdefault.cnf 8a5ed9dce8 Apply system_default configuration on SSL_CTX_new(). vor 6 Jahren
sysdefaulttest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
test.cnf d462b5ff21 Add -section option to 'req' command vor 4 Jahren
test_test.c e0249827b3 Fix --strict-warnings build vor 5 Jahren
testcrl.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b vor 26 Jahren
testdsa.pem 79a578b902 Add private/public key conversion tests vor 9 Jahren
testdsapub.pem 79a578b902 Add private/public key conversion tests vor 9 Jahren
testec-p256.pem 79a578b902 Add private/public key conversion tests vor 9 Jahren
testecpub-p256.pem 79a578b902 Add private/public key conversion tests vor 9 Jahren
tested25519.pem 81722fdf2e More testing for CLI usage of Ed25519 and Ed448 keys vor 4 Jahren
tested25519pub.pem 81722fdf2e More testing for CLI usage of Ed25519 and Ed448 keys vor 4 Jahren
tested448.pem 81722fdf2e More testing for CLI usage of Ed25519 and Ed448 keys vor 4 Jahren
tested448pub.pem 81722fdf2e More testing for CLI usage of Ed25519 and Ed448 keys vor 4 Jahren
testp7.pem dcb1ef5c22 Change PKCS#7 test data to take account of removal of vor 24 Jahren
testreq2.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b vor 26 Jahren
testrsa.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b vor 26 Jahren
testrsapub.pem 79a578b902 Add private/public key conversion tests vor 9 Jahren
testsid.pem 45f55f6a5b Remove SSLv2 support vor 9 Jahren
testutil.h c9ed9307f2 test: update EVP tests to include DRBG testing vor 4 Jahren
testx509.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b vor 26 Jahren
threadstest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
time_offset_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
tls-provider.c 363b1e5dae Make the naming scheme for dispatched functions more consistent vor 4 Jahren
tls13ccstest.c 33388b44b6 Update copyright year vor 4 Jahren
tls13encryptiontest.c ec27e619e8 Move MAC removal responsibility to the various protocol "enc" functions vor 4 Jahren
tls13secretstest.c 33388b44b6 Update copyright year vor 4 Jahren
uitest.c a43ce58f55 Updated test command line parsing to support commmon commands vor 5 Jahren
v3-cert1.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b vor 26 Jahren
v3-cert2.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b vor 26 Jahren
v3_ca_exts.cnf 4acd484d55 Make x509 -force_pubkey test case with self-issued cert more realistic vor 4 Jahren
v3ext.c 33388b44b6 Update copyright year vor 4 Jahren
v3nametest.c 454afd9866 Update copyright year vor 4 Jahren
verify_extra_test.c 0d8dbb52e3 Add X509_self_signed(), extending and improving documenation and tests vor 4 Jahren
versions.c 909f1a2e51 Following the license change, modify the boilerplates in test/ vor 5 Jahren
wpackettest.c 12cbb8e049 WPACKET: don't write DER length when we don't want to vor 4 Jahren
x509_check_cert_pkey_test.c 33388b44b6 Update copyright year vor 4 Jahren
x509_dup_cert_test.c 33388b44b6 Update copyright year vor 4 Jahren
x509_internal_test.c 878dc8dd95 Join the x509 and x509v3 directories vor 5 Jahren
x509_time_test.c 33388b44b6 Update copyright year vor 4 Jahren
x509aux.c 33388b44b6 Update copyright year vor 4 Jahren

README-dev.md

Guidelines for test developers

How to add recipes

For any test that you want to perform, you write a script located in test/recipes/, named {nn}-test_{name}.t, where {nn} is a two digit number and {name} is a unique name of your choice.

Please note that if a test involves a new testing executable, you will need to do some additions in test/build.info. Please refer to the section "Changes to test/build.info" below.

Naming conventions

A test executable is named test/{name}test.c

A test recipe is named test/recipes/{nn}-test_{name}.t, where {nn} is a two digit number and {name} is a unique name of your choice.

The number {nn} is (somewhat loosely) grouped as follows:

00-04  sanity, internal and essential API tests
05-09  individual symmetric cipher algorithms
10-14  math (bignum)
15-19  individual asymmetric cipher algorithms
20-24  openssl commands (some otherwise not tested)
25-29  certificate forms, generation and verification
30-35  engine and evp
60-79  APIs:
   60  X509 subsystem
   61  BIO subsystem
   65  CMP subsystem
   70  PACKET layer
80-89  "larger" protocols (CA, CMS, OCSP, SSL, TSA)
90-98  misc
99     most time consuming tests [such as test_fuzz]

A recipe that just runs a test executable

A script that just runs a program looks like this:

#! /usr/bin/perl

use OpenSSL::Test::Simple;

simple_test("test_{name}", "{name}test", "{name}");

{name} is the unique name you have chosen for your test.

The second argument to simple_test is the test executable, and simple_test expects it to be located in test/

For documentation on OpenSSL::Test::Simple, do perldoc util/perl/OpenSSL/Test/Simple.pm.

A recipe that runs a more complex test

For more complex tests, you will need to read up on Test::More and OpenSSL::Test. Test::More is normally preinstalled, do man Test::More for documentation. For OpenSSL::Test, do perldoc util/perl/OpenSSL/Test.pm.

A script to start from could be this:

#! /usr/bin/perl

use strict;
use warnings;
use OpenSSL::Test;

setup("test_{name}");

plan tests => 2;                # The number of tests being performed

ok(test1, "test1");
ok(test2, "test1");

sub test1
{
    # test feature 1
}

sub test2
{
    # test feature 2
}

Changes to test/build.info

Whenever a new test involves a new test executable you need to do the following (at all times, replace {NAME} and {name} with the name of your test):

  • add {name} to the list of programs under PROGRAMS_NO_INST

  • create a three line description of how to build the test, you will have to modify the include paths and source files if you don't want to use the basic test framework:

    SOURCE[{name}]={name}.c INCLUDE[{name}]=.. ../include ../apps/include DEPEND[{name}]=../libcrypto libtestutil.a

Generic form of C test executables

#include "testutil.h"

static int my_test(void)
{
    int testresult = 0;                 /* Assume the test will fail    */
    int observed;

    observed = function();              /* Call the code under test     */
    if (!TEST_int_eq(observed, 2))      /* Check the result is correct  */
        goto end;                       /* Exit on failure - optional   */

    testresult = 1;                     /* Mark the test case a success */
end:
    cleanup();                          /* Any cleanup you require      */
    return testresult;
}

int setup_tests(void)
{
    ADD_TEST(my_test);                  /* Add each test separately     */
    return 1;                           /* Indicate success             */
}

You should use the TEST_xxx macros provided by testutil.h to test all failure conditions. These macros produce an error message in a standard format if the condition is not met (and nothing if the condition is met). Additional information can be presented with the TEST_info macro that takes a printf format string and arguments. TEST_error is useful for complicated conditions, it also takes a printf format string and argument. In all cases the TEST_xxx macros are guaranteed to evaluate their arguments exactly once. This means that expressions with side effects are allowed as parameters. Thus,

if (!TEST_ptr(ptr = OPENSSL_malloc(..)))

works fine and can be used in place of:

ptr = OPENSSL_malloc(..);
if (!TEST_ptr(ptr))

The former produces a more meaningful message on failure than the latter.

Note that the test infrastructure automatically sets up all required environment variables (such as OPENSSL_MODULES, OPENSSL_CONF, etc.) for the tests. Individual tests may choose to override the default settings as required.