Nicola Tuveri fe16ae5f95 Test for constant-time flag leakage in BN_CTX 5 роки тому
..
certs 1f483a69bc Fix cert with rsa instead of rsaEncryption as public key algorithm 5 роки тому
ct 8c6afbc55c Verify SCT signatures 8 роки тому
d2i-tests a378a46985 add test for CVE-2016-7053 8 роки тому
ocsp-tests 121738d1cb Fix OCSP_basic_verify() cert chain construction in case bs->certs is NULL 7 роки тому
ossl_shim ac6bba6f6e Build: Change all _NO_INST to use attributes instead. 5 роки тому
recipes 73e62d40eb Add a test for interleaving app data with handshake data in TLSv1.3 5 роки тому
smime-certs 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
ssl-tests 088dfa1335 Add option to disable Extended Master Secret 5 роки тому
testutil a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
CAss.cnf a7be5759cf RT3809: basicConstraints is critical 8 роки тому
CAssdh.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 роки тому
CAssdsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 роки тому
CAssrsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 роки тому
CAtsa.cnf f0ef20bf38 Added support for ESSCertIDv2 7 роки тому
P1ss.cnf fec669388c Use 2K RSA and SHA256 in tests 9 роки тому
P2ss.cnf fec669388c Use 2K RSA and SHA256 in tests 9 роки тому
README f90486f4de Fix test documentation. 7 роки тому
README.external df4439186f Remove unnecessary trailing whitespace 5 роки тому
README.ssltest.md a84e5c9aa8 Session resume broken switching contexts 7 роки тому
Sssdsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 роки тому
Sssrsa.cnf 58964a4922 Import of old SSLeay release: SSLeay 0.9.0b 26 роки тому
Uss.cnf cb0585c2cb Create DSA and ECDSA certificates. 9 роки тому
aborttest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
afalgtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
asn1_decode_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
asn1_encode_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
asn1_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
asn1_string_table_test.c 275a7b9e5e typo ANS1 -> ASN1 6 роки тому
asn1_time_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
asynciotest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
asynctest.c 9f5a87fd66 add an additional async notification communication method based on callback 5 роки тому
bad_dtls_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
bftest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
bio_callback_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
bio_enc_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
bio_memleak_test.c c6048af23c Fix a memory leak in the mem bio 5 роки тому
bioprinttest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
bntest.c fe16ae5f95 Test for constant-time flag leakage in BN_CTX 5 роки тому
bntests.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
build.info 1bdbdaffdc Properties for implementation selection. 5 роки тому
casttest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
chacha_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
cipher_overhead_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
cipherbytes_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
cipherlist_test.c 3c83c5ba4f Ignore cipher suites when setting cipher list 5 роки тому
ciphername_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
clienthellotest.c 3c83c5ba4f Ignore cipher suites when setting cipher list 5 роки тому
cms-examples.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
cmsapitest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
conf_include_test.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
constant_time_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
context_internal_test.c 0b76ce99aa test/context_internal_test.c: don't initialize as a separate test 5 роки тому
crltest.c a727627922 Fix a memory leak with di2_X509_CRL reuse 5 роки тому
ct_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
ctype_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
curve448_internal_test.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
d2i_test.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
danetest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
danetest.in 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
danetest.pem 170b735820 DANE support for X509_verify_cert() 8 роки тому
destest.c 4b6ae3c3c2 add missing const 6 роки тому
dhtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
drbg_cavs_data.h 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
drbg_cavs_data_ctr.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
drbg_cavs_data_hash.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
drbg_cavs_data_hmac.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
drbg_cavs_test.c 760e2d60e6 Fix CID 1434549: Unchecked return value in test/evp_test.c 5 роки тому
drbgtest.c b1522fa5ef Address a bug in the DRBG tests where the reseeding wasn't properly 5 роки тому
drbgtest.h 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
dsa_no_digest_size_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
dsatest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
dtls_mtu_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
dtlstest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
dtlsv1listentest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
ec_internal_test.c 8f58ede095 [test] unit test for field_inv function pointer in EC_METHOD 5 роки тому
ecdsatest.c 9fc8f18f59 Use order not degree to calculate a buffer size in ecdsatest 5 роки тому
ecstresstest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
ectest.c fa1f030610 Add EC_GROUP_get0_field 5 роки тому
enginetest.c 1057c2c39f Cleaner disposal of ephemeral engine ids and names 6 роки тому
errtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
evp_extra_test.c 5dc40a83c7 Fix a crash in reuse of i2d_X509_PUBKEY 5 роки тому
evp_kdf_test.c 5a285addbf Added new EVP/KDF API. 5 роки тому
evp_test.c 5a285addbf Added new EVP/KDF API. 5 роки тому
evp_test.h 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
exdatatest.c e17f5b6a6b Add CRYPTO_alloc_ex_data() 5 роки тому
exptest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
fatalerrtest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
generate_buildtest.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
generate_ssl_tests.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
gmdifftest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
gosttest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
handshake_helper.c 09d62b336d Fix end-point shared secret for DTLS/SCTP 5 роки тому
handshake_helper.h 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
hmactest.c 1057c2c39f Cleaner disposal of ephemeral engine ids and names 6 роки тому
ideatest.c 9b34028187 Eliminate NOP cast 6 роки тому
igetest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
lhash_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
md2test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
mdc2_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
mdc2test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
memleaktest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
modes_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
ocspapitest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
packettest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
pbelutest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
pemtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
pkcs7-1.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 роки тому
pkcs7.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 роки тому
pkey_meth_kdf_test.c 5a285addbf Added new EVP/KDF API. 5 роки тому
pkey_meth_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
pkits-test.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
poly1305_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
property_test.c 4e1819a9a6 Fix a test ordering issue. 5 роки тому
rc2test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
rc4test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
rc5test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
rdrand_sanitytest.c df4439186f Remove unnecessary trailing whitespace 5 роки тому
recordlentest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
rsa_complex.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
rsa_mp_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
rsa_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
run_tests.pl 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
sanitytest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
secmemtest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
serverinfo.pem c655f40ed2 Require ServerInfo PEMs to be named "BEGIN SERVERINFO FOR"... 11 роки тому
serverinfo2.pem b878afae4b Add a SERVERINFOV2 format test file 7 роки тому
servername_test.c df4439186f Remove unnecessary trailing whitespace 5 роки тому
session.pem 6cf2dbd9fa Don't store the ticket nonce in the session 6 роки тому
shibboleth.pfx 70bf33d182 Add PKCS#12 UTF-8 interoperability test. 8 роки тому
shlibloadtest.c 41999e7d35 Introduce a no-pinshared option 5 роки тому
siphash_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
sm2_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
sm4_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
smcont.txt 382bb0b294 test/smcont.txt: trigger assertion in bio_enc.c. 8 роки тому
sparse_array_test.c 1bdbdaffdc Properties for implementation selection. 5 роки тому
srptest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
ssl_cert_table_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
ssl_test.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
ssl_test.tmpl f4941736a9 test/ssl_test.tmpl: make it work with elderly perl. 8 роки тому
ssl_test_ctx.c 09d62b336d Fix end-point shared secret for DTLS/SCTP 5 роки тому
ssl_test_ctx.h 09d62b336d Fix end-point shared secret for DTLS/SCTP 5 роки тому
ssl_test_ctx_test.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
ssl_test_ctx_test.conf cf72c75792 Implement Maximum Fragment Length TLS extension. 7 роки тому
sslapitest.c 088dfa1335 Add option to disable Extended Master Secret 5 роки тому
sslbuffertest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
sslcorrupttest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
ssltest_old.c 3c83c5ba4f Ignore cipher suites when setting cipher list 5 роки тому
ssltestlib.c 5c8b7b4caa Cleanup vxworks support to be able to compile for VxWorks 7 5 роки тому
ssltestlib.h 80c455d5ae Make sure we trigger retransmits in DTLS testing 5 роки тому
stack_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
sysdefault.cnf 8a5ed9dce8 Apply system_default configuration on SSL_CTX_new(). 6 роки тому
sysdefaulttest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
test.cnf fec669388c Use 2K RSA and SHA256 in tests 9 роки тому
test_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
testcrl.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 роки тому
testdsa.pem 79a578b902 Add private/public key conversion tests 9 роки тому
testdsapub.pem 79a578b902 Add private/public key conversion tests 9 роки тому
testec-p256.pem 79a578b902 Add private/public key conversion tests 9 роки тому
testecpub-p256.pem 79a578b902 Add private/public key conversion tests 9 роки тому
testp7.pem dcb1ef5c22 Change PKCS#7 test data to take account of removal of 24 роки тому
testreq2.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 роки тому
testrsa.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 роки тому
testrsapub.pem 79a578b902 Add private/public key conversion tests 9 роки тому
testsid.pem 45f55f6a5b Remove SSLv2 support 10 роки тому
testutil.h 5674466e00 Move libapps headers into their own directory 5 роки тому
testx509.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 роки тому
threadstest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
time_offset_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
tls13ccstest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
tls13encryptiontest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
tls13secretstest.c df4439186f Remove unnecessary trailing whitespace 5 роки тому
uitest.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
v3-cert1.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 роки тому
v3-cert2.pem d02b48c63a Import of old SSLeay release: SSLeay 0.8.1b 26 роки тому
v3ext.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
v3nametest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
verify_extra_test.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
versions.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
wpackettest.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
x509_check_cert_pkey_test.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
x509_dup_cert_test.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому
x509_internal_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
x509_time_test.c 909f1a2e51 Following the license change, modify the boilerplates in test/ 6 роки тому
x509aux.c a43ce58f55 Updated test command line parsing to support commmon commands 5 роки тому

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