Richard Levitte 989b2ad786 Move uplink file information to build.info files před 5 roky
..
certs 317ba78fe1 Add test cases for SM2 cert verification před 5 roky
ct 8c6afbc55c Verify SCT signatures před 8 roky
d2i-tests a378a46985 add test for CVE-2016-7053 před 7 roky
ocsp-tests 121738d1cb Fix OCSP_basic_verify() cert chain construction in case bs->certs is NULL před 6 roky
ossl_shim ac6bba6f6e Build: Change all _NO_INST to use attributes instead. před 5 roky
recipes dbc6268f68 Allow TLSv1.3 in a no-ec build před 5 roky
smime-certs 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
ssl-tests dbc6268f68 Allow TLSv1.3 in a no-ec build před 5 roky
testutil cb30e46b45 Really fail if we have a test failure před 5 roky
CAss.cnf a7be5759cf RT3809: basicConstraints is critical před 8 roky
CAssdh.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b před 25 roky
CAssdsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b před 25 roky
CAssrsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b před 25 roky
CAtsa.cnf f0ef20bf38 Added support for ESSCertIDv2 před 7 roky
P1ss.cnf fec669388c Use 2K RSA and SHA256 in tests před 9 roky
P2ss.cnf fec669388c Use 2K RSA and SHA256 in tests před 9 roky
README f3448f5481 issue-8493: Fix for filenames with newlines using openssl dgst před 5 roky
README.external df4439186f Remove unnecessary trailing whitespace před 5 roky
README.ssltest.md a84e5c9aa8 Session resume broken switching contexts před 6 roky
Sssdsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b před 25 roky
Sssrsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b před 25 roky
Uss.cnf cb0585c2cb Create DSA and ECDSA certificates. před 8 roky
aborttest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
aesgcmtest.c bcf082d130 FIPS AES_GCM IV gen changes před 5 roky
afalgtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
asn1_decode_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
asn1_encode_test.c 98f29466dc fix truncation of integers on 32bit AIX před 5 roky
asn1_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
asn1_string_table_test.c 275a7b9e5e typo ANS1 -> ASN1 před 5 roky
asn1_time_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
asynciotest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
asynctest.c 9f5a87fd66 add an additional async notification communication method based on callback před 5 roky
bad_dtls_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
bftest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
bio_callback_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
bio_enc_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
bio_memleak_test.c 06add280d9 Add test for the BIO_s_mem rdwr->rdonly->rdwr use-case před 5 roky
bioprinttest.c 98f29466dc fix truncation of integers on 32bit AIX před 5 roky
bn_internal_test.c a12864a5de removed BN_clear NULL checks před 5 roky
bn_rand_range.h 5d2f3e4a6c Test of uniformity of BN_rand_range output. před 5 roky
bntest.c 5d2f3e4a6c Test of uniformity of BN_rand_range output. před 5 roky
bntests.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
build.info 989b2ad786 Move uplink file information to build.info files před 5 roky
casttest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
chacha_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
cipher_overhead_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
cipherbytes_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
cipherlist_test.c 3c83c5ba4f Ignore cipher suites when setting cipher list před 5 roky
ciphername_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
clienthellotest.c 72962d025f Correctly initialise PACKET to zero in the tests to avoid possible problems před 5 roky
cms-examples.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
cmsapitest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
conf_include_test.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
constant_time_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
context_internal_test.c 1aedc35fd6 Instead of global data store it in an OPENSSL_CTX před 5 roky
crltest.c a727627922 Fix a memory leak with di2_X509_CRL reuse před 5 roky
ct_test.c 98f29466dc fix truncation of integers on 32bit AIX před 5 roky
ctype_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
curve448_internal_test.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
d2i_test.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
danetest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
danetest.in 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
danetest.pem 170b735820 DANE support for X509_verify_cert() před 8 roky
destest.c 4b6ae3c3c2 add missing const před 5 roky
dhtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
drbg_cavs_data.h 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
drbg_cavs_data_ctr.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
drbg_cavs_data_hash.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
drbg_cavs_data_hmac.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
drbg_cavs_test.c 1fb3c0afff Skip the no derivation functions when in FIPS mode because they are not před 5 roky
drbgtest.c 4e297b7441 Make the rand_crng code OPENSSL_CTX aware před 5 roky
drbgtest.h 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
dsa_no_digest_size_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
dsatest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
dtls_mtu_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
dtlstest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
dtlsv1listentest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
ec_internal_test.c 8f58ede095 [test] unit test for field_inv function pointer in EC_METHOD před 5 roky
ecdsatest.c 68ad17e874 Check for negative return for signature size.Addresses Coverity 1442933 před 5 roky
ecdsatest.h 1a31d8017e [test] modernize ecdsatest and extend ECDSA sign KATs před 5 roky
ecstresstest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
ectest.c a5cf198bad Fix no-ec2m před 5 roky
enginetest.c ad14e8e508 Coverity fixes před 5 roky
errtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
evp_extra_test.c 87762939b5 Fixed typo in code comment. před 5 roky
evp_kdf_test.c f0efeea29e PBKDF2 updates to conform to SP800-132 před 5 roky
evp_pkey_dparams_test.c d4e2d5db62 fix timeout in 30-test_evp_pkey_dparam před 5 roky
evp_test.c d5e5e2ffaf Move digests to providers před 5 roky
evp_test.h 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
exdatatest.c e17f5b6a6b Add CRYPTO_alloc_ex_data() před 5 roky
exptest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
fatalerrtest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
generate_buildtest.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
generate_ssl_tests.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
gmdifftest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
gosttest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
handshake_helper.c 09d62b336d Fix end-point shared secret for DTLS/SCTP před 5 roky
handshake_helper.h 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
hmactest.c 1057c2c39f Cleaner disposal of ephemeral engine ids and names před 5 roky
ideatest.c 9b34028187 Eliminate NOP cast před 5 roky
igetest.c fd367b4ce3 Deprecate AES_ige_encrypt() and AES_bi_ige_encrypt() před 5 roky
lhash_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
md2test.c d030892312 Add a legacy provider and put MD2 in it před 5 roky
mdc2_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
mdc2test.c d5e5e2ffaf Move digests to providers před 5 roky
memleaktest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
modes_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
ocspapitest.c 5b3accde60 OCSP: fix memory leak in OCSP_url_svcloc_new method. před 5 roky
ossl_test_endian.h a9e34e9ef1 Fix test builds. před 5 roky
p_test.c 1ccf49737c p_get_params() [test/p_test.c]: clear the OSSL_PARAM buffers for every test před 5 roky
packettest.c 72962d025f Correctly initialise PACKET to zero in the tests to avoid possible problems před 5 roky
params_api_test.c f55ed701a4 Params API: {utf8,octet}_ptr need to know the data size před 5 roky
params_conversion_test.c a1f0478277 Fix Windows Compile failure due to missing <inttypes.h> před 5 roky
params_test.c bbcaef6324 test/params_test.c : Adjust tests to check utf8_ptr sizes před 5 roky
pbelutest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
pemtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
pkcs7-1.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b před 25 roky
pkcs7.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b před 25 roky
pkey_meth_kdf_test.c 5a285addbf Added new EVP/KDF API. před 5 roky
pkey_meth_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
pkits-test.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
poly1305_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
property_test.c da89ac0b25 Optional property query support. před 5 roky
provider_internal_test.c 2a2bc6fc12 For provider tests, don't define a OPENSSL_NO_ macro před 5 roky
provider_internal_test.conf.in 6d872a838d Add test for the provider configuration module před 5 roky
provider_test.c 2a2bc6fc12 For provider tests, don't define a OPENSSL_NO_ macro před 5 roky
rc2test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
rc4test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
rc5test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
rdrand_sanitytest.c df4439186f Remove unnecessary trailing whitespace před 5 roky
recordlentest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
rsa_complex.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
rsa_mp_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
rsa_sp800_56b_test.c a12864a5de removed BN_clear NULL checks před 5 roky
rsa_test.c 8240d5fa65 FIPS 186-4 RSA Generation & Validation před 5 roky
run_tests.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
sanitytest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
secmemtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
serverinfo.pem c655f40ed2 Require ServerInfo PEMs to be named "BEGIN SERVERINFO FOR"... před 10 roky
serverinfo2.pem b878afae4b Add a SERVERINFOV2 format test file před 7 roky
servername_test.c 72962d025f Correctly initialise PACKET to zero in the tests to avoid possible problems před 5 roky
session.pem 6cf2dbd9fa Don't store the ticket nonce in the session před 6 roky
shibboleth.pfx 70bf33d182 Add PKCS#12 UTF-8 interoperability test. před 7 roky
shlibloadtest.c 41999e7d35 Introduce a no-pinshared option před 5 roky
siphash_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
sm2_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
sm4_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
smcont.txt 382bb0b294 test/smcont.txt: trigger assertion in bio_enc.c. před 7 roky
sparse_array_test.c 8ab53b193a Make the sparse array code use ossl_uintmax_t as its index rather than size_t. před 5 roky
srptest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
ssl_cert_table_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
ssl_test.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
ssl_test.tmpl f4941736a9 test/ssl_test.tmpl: make it work with elderly perl. před 7 roky
ssl_test_ctx.c 09d62b336d Fix end-point shared secret for DTLS/SCTP před 5 roky
ssl_test_ctx.h 09d62b336d Fix end-point shared secret for DTLS/SCTP před 5 roky
ssl_test_ctx_test.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
ssl_test_ctx_test.conf cf72c75792 Implement Maximum Fragment Length TLS extension. před 6 roky
sslapitest.c dbc6268f68 Allow TLSv1.3 in a no-ec build před 5 roky
sslbuffertest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
sslcorrupttest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
ssltest_old.c 3c83c5ba4f Ignore cipher suites when setting cipher list před 5 roky
ssltestlib.c a77b4dba23 Write a test for receiving a KeyUpdate (update requested) while writing před 5 roky
ssltestlib.h a77b4dba23 Write a test for receiving a KeyUpdate (update requested) while writing před 5 roky
stack_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
sysdefault.cnf 8a5ed9dce8 Apply system_default configuration on SSL_CTX_new(). před 6 roky
sysdefaulttest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
test.cnf fec669388c Use 2K RSA and SHA256 in tests před 9 roky
test_test.c c5f7a99645 Test skip option. před 5 roky
testcrl.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b před 25 roky
testdsa.pem 79a578b902 Add private/public key conversion tests před 9 roky
testdsapub.pem 79a578b902 Add private/public key conversion tests před 9 roky
testec-p256.pem 79a578b902 Add private/public key conversion tests před 9 roky
testecpub-p256.pem 79a578b902 Add private/public key conversion tests před 9 roky
testp7.pem dcb1ef5c22 Change PKCS#7 test data to take account of removal of před 24 roky
testreq2.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b před 25 roky
testrsa.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b před 25 roky
testrsapub.pem 79a578b902 Add private/public key conversion tests před 9 roky
testsid.pem 45f55f6a5b Remove SSLv2 support před 9 roky
testutil.h c5f7a99645 Test skip option. před 5 roky
testx509.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b před 25 roky
threadstest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
time_offset_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
tls13ccstest.c 65dc5c3cc1 Fix no-ec with no-dh před 5 roky
tls13encryptiontest.c 555cbb328e Collapse ssl3_state_st (s3) into ssl_st před 5 roky
tls13secretstest.c df4439186f Remove unnecessary trailing whitespace před 5 roky
uitest.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
v3-cert1.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b před 25 roky
v3-cert2.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b před 25 roky
v3ext.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
v3nametest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
verify_extra_test.c ccf453610f Make X509_set_sm2_id consistent with other setters před 5 roky
versions.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
wpackettest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
x509_check_cert_pkey_test.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
x509_dup_cert_test.c a43ce58f55 Updated test command line parsing to support commmon commands před 5 roky
x509_internal_test.c 878dc8dd95 Join the x509 and x509v3 directories před 5 roky
x509_time_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ před 5 roky
x509aux.c 9fdcc21fdc constify *_dup() and *i2d_*() and related functions as far as possible, introducing DECLARE_ASN1_DUP_FUNCTION před 5 roky

README

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/Makefile. More on this later.


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