Matt Caswell f4764841dc Update copyright year 5 jaren geleden
..
certs c2c2c7b3f1 Limit scope of CN name constraints 6 jaren geleden
ct 8c6afbc55c Verify SCT signatures 8 jaren geleden
d2i-tests e9fcdd2e69 add test for CVE-2016-7053 8 jaren geleden
ocsp-tests bfb10f970f Fix OCSP_basic_verify() cert chain construction in case bs->certs is NULL 7 jaren geleden
recipes f4764841dc Update copyright year 5 jaren geleden
smime-certs 3b8986d39d Add alternative CMS P-256 cert 7 jaren geleden
ssl-tests f520f134d1 Update copyright year 6 jaren geleden
CAss.cnf a7be5759cf RT3809: basicConstraints is critical 8 jaren geleden
CAssdh.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 jaren geleden
CAssdsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 jaren geleden
CAssrsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 jaren geleden
CAtsa.cnf 2cc7acd273 Use better defaults for TSA. 9 jaren geleden
P1ss.cnf fec669388c Use 2K RSA and SHA256 in tests 9 jaren geleden
P2ss.cnf fec669388c Use 2K RSA and SHA256 in tests 9 jaren geleden
README 6c80afbd6c test/README: clarify test number groups 8 jaren geleden
README.ssltest.md 75f12d7cbf Add new ssl_test option. 8 jaren geleden
Sssdsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 jaren geleden
Sssrsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 jaren geleden
Uss.cnf cb0585c2cb Create DSA and ECDSA certificates. 9 jaren geleden
aborttest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
afalgtest.c 0d9fece7d4 afalg: Fix kernel version check 7 jaren geleden
asynciotest.c f520f134d1 Update copyright year 6 jaren geleden
asynctest.c 4c8b3b5c5a asynctest: don't depend on apps 7 jaren geleden
bad_dtls_test.c fae00c9321 Remove unicode characters from source 7 jaren geleden
bftest.c a836f9fa95 Standardize syntax of sizeof(foo) 7 jaren geleden
bio_enc_test.c 61884b8140 Fix bio_enc_test 8 jaren geleden
bioprinttest.c 6b4a77f56e Whitespace cleanup in apps 8 jaren geleden
bntest.c c4e901dbdb Test for constant-time flag leakage in BN_CTX 5 jaren geleden
build.info b7fc0784c4 [test] unit test for field_inv function pointer in EC_METHOD 5 jaren geleden
casttest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
cipherlist_test.c d33726b92e To avoid SWEET32 attack, move 3DES to weak 8 jaren geleden
clienthellotest.c f520f134d1 Update copyright year 6 jaren geleden
cms-examples.pl e0a651945c Copyright consolidation: perl files 8 jaren geleden
constant_time_test.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
crltest.c ff7256e759 GH2176: Add X509_VERIFY_PARAM_get_time 8 jaren geleden
ct_test.c a8e613cc51 Update copyright year 6 jaren geleden
d2i_test.c a836f9fa95 Standardize syntax of sizeof(foo) 7 jaren geleden
danetest.c 3aa62f3951 Fix some -Wshadow warnings 7 jaren geleden
danetest.in 5ae4ceb92c Perform DANE-EE(3) name checks by default 8 jaren geleden
danetest.pem 170b735820 DANE support for X509_verify_cert() 9 jaren geleden
destest.c 6025001707 spelling fixes, just comments and readme. 8 jaren geleden
dhtest.c a836f9fa95 Standardize syntax of sizeof(foo) 7 jaren geleden
dsatest.c a836f9fa95 Standardize syntax of sizeof(foo) 7 jaren geleden
dtlstest.c f520f134d1 Update copyright year 6 jaren geleden
dtlsv1listentest.c 65e2d67254 Simplify and rename SSL_set_rbio() and SSL_set_wbio() 8 jaren geleden
ec_internal_test.c b7fc0784c4 [test] unit test for field_inv function pointer in EC_METHOD 5 jaren geleden
ecdsatest.c 6025001707 spelling fixes, just comments and readme. 8 jaren geleden
ectest.c a836f9fa95 Standardize syntax of sizeof(foo) 7 jaren geleden
enginetest.c 20fe5052ba Backport key redirection test from master branch 7 jaren geleden
errtest.c 1ae891c6b1 Save and restore the Windows error around TlsGetValue. 6 jaren geleden
evp_extra_test.c 374804bd09 Key zeroization fix for EVP_SealInit. 6 jaren geleden
evp_test.c 6244f53177 Update copyright year 6 jaren geleden
exdatatest.c 8ab4fed9bd Fix ex_data and session_dup issues 7 jaren geleden
exptest.c 0aa0e13a6a Fix typo in comment 7 jaren geleden
fatalerrtest.c f520f134d1 Update copyright year 6 jaren geleden
generate_buildtest.pl 5cdad22f3e Move the building of test/buildtest_*. to be done unconditionally 8 jaren geleden
generate_ssl_tests.pl 470a601705 Consolidate the locations where we have our internal perl modules 7 jaren geleden
gmdifftest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
handshake_helper.c f520f134d1 Update copyright year 6 jaren geleden
handshake_helper.h 75f12d7cbf Add new ssl_test option. 8 jaren geleden
heartbeat_test.c 464175692f Simplify SSL BIO buffering logic 8 jaren geleden
hmactest.c 8a3c000c8f Fix hmac test case 6 8 jaren geleden
ideatest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
igetest.c a836f9fa95 Standardize syntax of sizeof(foo) 7 jaren geleden
md2test.c d166ed8c11 check return values for EVP_Digest*() APIs 8 jaren geleden
md4test.c d166ed8c11 check return values for EVP_Digest*() APIs 8 jaren geleden
md5test.c d166ed8c11 check return values for EVP_Digest*() APIs 8 jaren geleden
mdc2test.c d166ed8c11 check return values for EVP_Digest*() APIs 8 jaren geleden
memleaktest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
methtest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
ocspapitest.c c24470d036 Wrap more of ocspapitest.c in OPENSSL_NO_OCSP 7 jaren geleden
p5_crpt2_test.c 93b8981d89 Useless includes 8 jaren geleden
packettest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
pbelutest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
pkcs7-1.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 jaren geleden
pkcs7.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 jaren geleden
pkits-test.pl e0a651945c Copyright consolidation: perl files 8 jaren geleden
r160test.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
randtest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
rc2test.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
rc4test.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
rc5test.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
rmdtest.c d166ed8c11 check return values for EVP_Digest*() APIs 8 jaren geleden
rsa_complex.c 55b1542ca5 Add a compile time test to verify that openssl/rsa.h and complex.h can 6 jaren geleden
rsa_test.c a836f9fa95 Standardize syntax of sizeof(foo) 7 jaren geleden
run_tests.pl 470a601705 Consolidate the locations where we have our internal perl modules 7 jaren geleden
sanitytest.c a836f9fa95 Standardize syntax of sizeof(foo) 7 jaren geleden
secmemtest.c a8e613cc51 Update copyright year 6 jaren geleden
serverinfo.pem c655f40ed2 Require ServerInfo PEMs to be named "BEGIN SERVERINFO FOR"... 11 jaren geleden
sha1test.c d166ed8c11 check return values for EVP_Digest*() APIs 8 jaren geleden
sha256t.c d166ed8c11 check return values for EVP_Digest*() APIs 8 jaren geleden
sha512t.c d166ed8c11 check return values for EVP_Digest*() APIs 8 jaren geleden
shibboleth.pfx 70bf33d182 Add PKCS#12 UTF-8 interoperability test. 8 jaren geleden
shlibloadtest.c 867dc5441a Fix a gcc-8 warning -Wcast-function-type 6 jaren geleden
smcont.txt 382bb0b294 test/smcont.txt: trigger assertion in bio_enc.c. 8 jaren geleden
srptest.c 25a127bde9 Add SRP test vectors from RFC5054 8 jaren geleden
ssl_test.c f520f134d1 Update copyright year 6 jaren geleden
ssl_test.tmpl f4941736a9 test/ssl_test.tmpl: make it work with elderly perl. 8 jaren geleden
ssl_test_ctx.c d52c9b58a6 Fix a mem leak in ssl_test_ctx.c 8 jaren geleden
ssl_test_ctx.h 9c5a691d57 Provide a test for the Encrypt-Then-Mac renegotiation crash 8 jaren geleden
ssl_test_ctx_test.c 062ed73f58 Add some CertStatus tests 8 jaren geleden
ssl_test_ctx_test.conf 6dc9974547 Port multi-buffer tests 8 jaren geleden
sslapitest.c d2118367ad Add a test for SSL_pending() 6 jaren geleden
sslcorrupttest.c f520f134d1 Update copyright year 6 jaren geleden
ssltest_old.c f520f134d1 Update copyright year 6 jaren geleden
ssltestlib.c f520f134d1 Update copyright year 6 jaren geleden
ssltestlib.h f520f134d1 Update copyright year 6 jaren geleden
test.cnf fec669388c Use 2K RSA and SHA256 in tests 9 jaren geleden
testcrl.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 jaren geleden
testdsa.pem 79a578b902 Add private/public key conversion tests 9 jaren geleden
testdsapub.pem 79a578b902 Add private/public key conversion tests 9 jaren geleden
testec-p256.pem 79a578b902 Add private/public key conversion tests 9 jaren geleden
testecpub-p256.pem 79a578b902 Add private/public key conversion tests 9 jaren geleden
testp7.pem dcb1ef5c22 Change PKCS#7 test data to take account of removal of 24 jaren geleden
testreq2.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 jaren geleden
testrsa.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 jaren geleden
testrsapub.pem 79a578b902 Add private/public key conversion tests 9 jaren geleden
testsid.pem 45f55f6a5b Remove SSLv2 support 10 jaren geleden
testutil.c ce2cdac278 SSL test framework: port NPN and ALPN tests 8 jaren geleden
testutil.h 4c3376ec27 Add -Wundef to strict-warnings 7 jaren geleden
testx509.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 jaren geleden
threadstest.c f1f5ee17b6 include/openssl: don't include <windows.h> in public headers. 8 jaren geleden
v3-cert1.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 jaren geleden
v3-cert2.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 jaren geleden
v3ext.c e417070c9f Add some accessor API's 8 jaren geleden
v3nametest.c 440e5d805f Copyright consolidation 02/10 8 jaren geleden
verify_extra_test.c 6244f53177 Update copyright year 6 jaren geleden
versions.c cde87deafa Refuse to run test_cipherlist unless shared library matches build 6 jaren geleden
wp_test.c eeac54ef6d crypto/cryptlib.c: omit OPENSSL_ia32cap_loc(). 8 jaren geleden
x509_dup_cert_test.c f96d3c1fc6 Avoid errors when loading a cert multiple times. 6 jaren geleden
x509_time_test.c 6244f53177 Update copyright year 6 jaren geleden
x509aux.c 2178c52a8b test/x509aux.c: Fix argv loop 8 jaren geleden

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-99 misc


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 test/testlib/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 test/testlib/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/Makefile
========================

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):

* among the variables for test executables at the beginning, add a line like
this:

{NAME}TEST= {name}test

* add `$({NAME}TEST)$(EXE_EXT)' to the assignment of EXE:

* add `$({NAME}TEST).o' to the assignment of OBJ:

* add `$({NAME}TEST).c' to the assignment of SRC:

* add the following lines for building the executable:

$({NAME}TEST)$(EXE_EXT): $({NAME}TEST).o $(DLIBCRYPTO)
@target=$({NAME}TEST); $(BUILD_CMD)