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.
Rich Salz 440e5d805f
Copyright consolidation 02/10
7 years ago
..
certs Move peer chain security checks into x509_vfy.c 7 years ago
ct Verify SCT signatures 7 years ago
d2i-tests Add ASN.1 INTEGER tests. 7 years ago
ocsp-tests Fix OCSP checking. 10 years ago
recipes VMS perl: Fix glob output 7 years ago
smime-certs Add X9.42 DH certificate to S/MIME test 10 years ago
ssl-tests Remove proxy tests. Add verify callback tests. 7 years ago
testlib/OpenSSL testlib/OpenSSL/Test.pm: address 5.10 warnings. 7 years ago
CAss.cnf GH645: Fix typo: ctificates -> certificates 7 years ago
CAssdh.cnf Import of old SSLeay release: SSLeay 0.9.0b 25 years ago
CAssdsa.cnf Import of old SSLeay release: SSLeay 0.9.0b 25 years ago
CAssrsa.cnf Import of old SSLeay release: SSLeay 0.9.0b 25 years ago
CAtsa.cnf Use better defaults for TSA. 7 years ago
P1ss.cnf Use 2K RSA and SHA256 in tests 8 years ago
P2ss.cnf Use 2K RSA and SHA256 in tests 8 years ago
README Add documentation for the new testing framework 8 years ago
README.ssltest.md Remove proxy tests. Add verify callback tests. 7 years ago
Sssdsa.cnf Import of old SSLeay release: SSLeay 0.9.0b 25 years ago
Sssrsa.cnf Import of old SSLeay release: SSLeay 0.9.0b 25 years ago
Uss.cnf Create DSA and ECDSA certificates. 8 years ago
aborttest.c Copyright consolidation 02/10 7 years ago
afalgtest.c Copyright consolidation 02/10 7 years ago
asynctest.c Copyright consolidation 02/10 7 years ago
bftest.c Copyright consolidation 02/10 7 years ago
bntest.c Copyright consolidation 02/10 7 years ago
build.info Replace cipherlist test 7 years ago
casttest.c Copyright consolidation 02/10 7 years ago
cipherlist_test.c Replace cipherlist test 7 years ago
clienthellotest.c Copyright consolidation 02/10 7 years ago
cms-examples.pl Copyright consolidation: perl files 7 years ago
constant_time_test.c Copyright consolidation 02/10 7 years ago
ct_test.c Copyright consolidation 02/10 7 years ago
d2i_test.c Copyright consolidation 02/10 7 years ago
danetest.c Copyright consolidation 02/10 7 years ago
danetest.in Suppress DANE TLSA reflection when verification fails 7 years ago
danetest.pem DANE support for X509_verify_cert() 7 years ago
destest.c Copyright consolidation 02/10 7 years ago
dhtest.c Copyright consolidation 02/10 7 years ago
dsatest.c Copyright consolidation 02/10 7 years ago
dtlsv1listentest.c Copyright consolidation 02/10 7 years ago
ecdhtest.c Copyright consolidation 02/10 7 years ago
ecdhtest_cavs.h Copyright consolidation 02/10 7 years ago
ecdsatest.c Copyright consolidation 02/10 7 years ago
ectest.c Copyright consolidation 02/10 7 years ago
enginetest.c Copyright consolidation 02/10 7 years ago
evp_extra_test.c Copyright consolidation 02/10 7 years ago
evp_test.c Copyright consolidation 02/10 7 years ago
evptests.txt crypto/blake2: make lowest-level function handle multiple blocks.. 7 years ago
exdatatest.c Copyright consolidation 02/10 7 years ago
exptest.c Copyright consolidation 02/10 7 years ago
generate_ssl_tests.pl New SSL test framework 7 years ago
gmdifftest.c Copyright consolidation 02/10 7 years ago
handshake_helper.c Copyright consolidation 02/10 7 years ago
handshake_helper.h Copyright consolidation 02/10 7 years ago
heartbeat_test.c Copyright consolidation 02/10 7 years ago
hmactest.c Copyright consolidation 02/10 7 years ago
ideatest.c Copyright consolidation 02/10 7 years ago
igetest.c Copyright consolidation 02/10 7 years ago
md2test.c Copyright consolidation 02/10 7 years ago
md4test.c Copyright consolidation 02/10 7 years ago
md5test.c Copyright consolidation 02/10 7 years ago
mdc2test.c Copyright consolidation 02/10 7 years ago
memleaktest.c Copyright consolidation 02/10 7 years ago
methtest.c Copyright consolidation 02/10 7 years ago
nptest.c Copyright consolidation 02/10 7 years ago
p5_crpt2_test.c Copyright consolidation 02/10 7 years ago
packettest.c Copyright consolidation 02/10 7 years ago
pbelutest.c Copyright consolidation 02/10 7 years ago
pkcs7-1.pem Import of old SSLeay release: SSLeay 0.8.1b 25 years ago
pkcs7.pem Import of old SSLeay release: SSLeay 0.8.1b 25 years ago
pkits-test.pl Copyright consolidation: perl files 7 years ago
r160test.c Copyright consolidation 02/10 7 years ago
randtest.c Copyright consolidation 02/10 7 years ago
rc2test.c Copyright consolidation 02/10 7 years ago
rc4test.c Copyright consolidation 02/10 7 years ago
rc5test.c Copyright consolidation 02/10 7 years ago
rmdtest.c Copyright consolidation 02/10 7 years ago
rsa_test.c Copyright consolidation 02/10 7 years ago
run_tests.pl Replace cipherlist test 7 years ago
secmemtest.c Copyright consolidation 02/10 7 years ago
serverinfo.pem Require ServerInfo PEMs to be named "BEGIN SERVERINFO FOR"... 10 years ago
sha1test.c Copyright consolidation 02/10 7 years ago
sha256t.c Copyright consolidation 02/10 7 years ago
sha512t.c Copyright consolidation 02/10 7 years ago
smcont.txt Add extensive PCKS7 and CMS consistency test script. 15 years ago
srptest.c Copyright consolidation 02/10 7 years ago
ssl_test.c Copyright consolidation 02/10 7 years ago
ssl_test.tmpl New SSL test framework 7 years ago
ssl_test_ctx.c Copyright consolidation 02/10 7 years ago
ssl_test_ctx.h Copyright consolidation 02/10 7 years ago
ssl_test_ctx_test.c Copyright consolidation 02/10 7 years ago
ssl_test_ctx_test.conf Remove proxy tests. Add verify callback tests. 7 years ago
ssltest_old.c Copyright consolidation 02/10 7 years ago
test.cnf Use 2K RSA and SHA256 in tests 8 years ago
test_aesni test_aesni: harmonize with AES-NI support at EVP layer. 11 years ago
test_padlock Update test/test_padlock script. 14 years ago
test_t4 Add support for SPARC T4 DES opcode. 10 years ago
testcrl.pem Import of old SSLeay release: SSLeay 0.8.1b 25 years ago
testdsa.pem Add private/public key conversion tests 8 years ago
testdsapub.pem Add private/public key conversion tests 8 years ago
testec-p256.pem Add private/public key conversion tests 8 years ago
testecpub-p256.pem Add private/public key conversion tests 8 years ago
testp7.pem Change PKCS#7 test data to take account of removal of 23 years ago
testreq2.pem Import of old SSLeay release: SSLeay 0.8.1b 25 years ago
testrsa.pem Import of old SSLeay release: SSLeay 0.8.1b 25 years ago
testrsapub.pem Add private/public key conversion tests 8 years ago
testsid.pem Remove SSLv2 support 8 years ago
testutil.c Copyright consolidation 02/10 7 years ago
testutil.h Copyright consolidation 02/10 7 years ago
testx509.pem Import of old SSLeay release: SSLeay 0.8.1b 25 years ago
threadstest.c Copyright consolidation 02/10 7 years ago
times Updates from 1.0.0-stable branch. 14 years ago
v3-cert1.pem Import of old SSLeay release: SSLeay 0.8.1b 25 years ago
v3-cert2.pem Import of old SSLeay release: SSLeay 0.8.1b 25 years ago
v3nametest.c Copyright consolidation 02/10 7 years ago
verify_extra_test.c Copyright consolidation 02/10 7 years ago
wp_test.c Copyright consolidation 02/10 7 years ago
x509aux.c Fix i2d_X509_AUX, update docs and add tests 7 years ago

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 convetions
=================

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:

05 individual symmetric cipher algorithms
10 math (bignum)
15 individual asymmetric cipher algorithms
20 openssl enc
25 certificate forms, generation and verification
30 engine and evp
70 PACKET layer
80 "larger" protocols (CA, CMS, OCSP, SSL, TSA)
90 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)