polardbxengine/extra/openssl-1.1.0l/test
dengwendi 1d6524707e INIT 2023-11-15 15:04:10 +08:00
..
certs INIT 2023-11-15 15:04:10 +08:00
ct INIT 2023-11-15 15:04:10 +08:00
d2i-tests INIT 2023-11-15 15:04:10 +08:00
ocsp-tests INIT 2023-11-15 15:04:10 +08:00
recipes INIT 2023-11-15 15:04:10 +08:00
smime-certs INIT 2023-11-15 15:04:10 +08:00
ssl-tests INIT 2023-11-15 15:04:10 +08:00
CAss.cnf INIT 2023-11-15 15:04:10 +08:00
CAssdh.cnf INIT 2023-11-15 15:04:10 +08:00
CAssdsa.cnf INIT 2023-11-15 15:04:10 +08:00
CAssrsa.cnf INIT 2023-11-15 15:04:10 +08:00
CAtsa.cnf INIT 2023-11-15 15:04:10 +08:00
P1ss.cnf INIT 2023-11-15 15:04:10 +08:00
P2ss.cnf INIT 2023-11-15 15:04:10 +08:00
README INIT 2023-11-15 15:04:10 +08:00
README.ssltest.md INIT 2023-11-15 15:04:10 +08:00
Sssdsa.cnf INIT 2023-11-15 15:04:10 +08:00
Sssrsa.cnf INIT 2023-11-15 15:04:10 +08:00
Uss.cnf INIT 2023-11-15 15:04:10 +08:00
aborttest.c INIT 2023-11-15 15:04:10 +08:00
afalgtest.c INIT 2023-11-15 15:04:10 +08:00
asynciotest.c INIT 2023-11-15 15:04:10 +08:00
asynctest.c INIT 2023-11-15 15:04:10 +08:00
bad_dtls_test.c INIT 2023-11-15 15:04:10 +08:00
bftest.c INIT 2023-11-15 15:04:10 +08:00
bio_enc_test.c INIT 2023-11-15 15:04:10 +08:00
bioprinttest.c INIT 2023-11-15 15:04:10 +08:00
bntest.c INIT 2023-11-15 15:04:10 +08:00
build.info INIT 2023-11-15 15:04:10 +08:00
casttest.c INIT 2023-11-15 15:04:10 +08:00
cipherlist_test.c INIT 2023-11-15 15:04:10 +08:00
clienthellotest.c INIT 2023-11-15 15:04:10 +08:00
cms-examples.pl INIT 2023-11-15 15:04:10 +08:00
constant_time_test.c INIT 2023-11-15 15:04:10 +08:00
crltest.c INIT 2023-11-15 15:04:10 +08:00
ct_test.c INIT 2023-11-15 15:04:10 +08:00
d2i_test.c INIT 2023-11-15 15:04:10 +08:00
danetest.c INIT 2023-11-15 15:04:10 +08:00
danetest.in INIT 2023-11-15 15:04:10 +08:00
danetest.pem INIT 2023-11-15 15:04:10 +08:00
destest.c INIT 2023-11-15 15:04:10 +08:00
dhtest.c INIT 2023-11-15 15:04:10 +08:00
dsatest.c INIT 2023-11-15 15:04:10 +08:00
dtlstest.c INIT 2023-11-15 15:04:10 +08:00
dtlsv1listentest.c INIT 2023-11-15 15:04:10 +08:00
ec_internal_test.c INIT 2023-11-15 15:04:10 +08:00
ecdsatest.c INIT 2023-11-15 15:04:10 +08:00
ectest.c INIT 2023-11-15 15:04:10 +08:00
enginetest.c INIT 2023-11-15 15:04:10 +08:00
errtest.c INIT 2023-11-15 15:04:10 +08:00
evp_extra_test.c INIT 2023-11-15 15:04:10 +08:00
evp_test.c INIT 2023-11-15 15:04:10 +08:00
exdatatest.c INIT 2023-11-15 15:04:10 +08:00
exptest.c INIT 2023-11-15 15:04:10 +08:00
fatalerrtest.c INIT 2023-11-15 15:04:10 +08:00
generate_buildtest.pl INIT 2023-11-15 15:04:10 +08:00
generate_ssl_tests.pl INIT 2023-11-15 15:04:10 +08:00
gmdifftest.c INIT 2023-11-15 15:04:10 +08:00
handshake_helper.c INIT 2023-11-15 15:04:10 +08:00
handshake_helper.h INIT 2023-11-15 15:04:10 +08:00
heartbeat_test.c INIT 2023-11-15 15:04:10 +08:00
hmactest.c INIT 2023-11-15 15:04:10 +08:00
ideatest.c INIT 2023-11-15 15:04:10 +08:00
igetest.c INIT 2023-11-15 15:04:10 +08:00
md2test.c INIT 2023-11-15 15:04:10 +08:00
md4test.c INIT 2023-11-15 15:04:10 +08:00
md5test.c INIT 2023-11-15 15:04:10 +08:00
mdc2test.c INIT 2023-11-15 15:04:10 +08:00
memleaktest.c INIT 2023-11-15 15:04:10 +08:00
methtest.c INIT 2023-11-15 15:04:10 +08:00
ocspapitest.c INIT 2023-11-15 15:04:10 +08:00
p5_crpt2_test.c INIT 2023-11-15 15:04:10 +08:00
packettest.c INIT 2023-11-15 15:04:10 +08:00
pbelutest.c INIT 2023-11-15 15:04:10 +08:00
pkcs7-1.pem INIT 2023-11-15 15:04:10 +08:00
pkcs7.pem INIT 2023-11-15 15:04:10 +08:00
pkits-test.pl INIT 2023-11-15 15:04:10 +08:00
r160test.c INIT 2023-11-15 15:04:10 +08:00
randtest.c INIT 2023-11-15 15:04:10 +08:00
rc2test.c INIT 2023-11-15 15:04:10 +08:00
rc4test.c INIT 2023-11-15 15:04:10 +08:00
rc5test.c INIT 2023-11-15 15:04:10 +08:00
rmdtest.c INIT 2023-11-15 15:04:10 +08:00
rsa_complex.c INIT 2023-11-15 15:04:10 +08:00
rsa_test.c INIT 2023-11-15 15:04:10 +08:00
run_tests.pl INIT 2023-11-15 15:04:10 +08:00
sanitytest.c INIT 2023-11-15 15:04:10 +08:00
secmemtest.c INIT 2023-11-15 15:04:10 +08:00
serverinfo.pem INIT 2023-11-15 15:04:10 +08:00
sha1test.c INIT 2023-11-15 15:04:10 +08:00
sha256t.c INIT 2023-11-15 15:04:10 +08:00
sha512t.c INIT 2023-11-15 15:04:10 +08:00
shibboleth.pfx INIT 2023-11-15 15:04:10 +08:00
shlibloadtest.c INIT 2023-11-15 15:04:10 +08:00
smcont.txt INIT 2023-11-15 15:04:10 +08:00
srptest.c INIT 2023-11-15 15:04:10 +08:00
ssl_test.c INIT 2023-11-15 15:04:10 +08:00
ssl_test.tmpl INIT 2023-11-15 15:04:10 +08:00
ssl_test_ctx.c INIT 2023-11-15 15:04:10 +08:00
ssl_test_ctx.h INIT 2023-11-15 15:04:10 +08:00
ssl_test_ctx_test.c INIT 2023-11-15 15:04:10 +08:00
ssl_test_ctx_test.conf INIT 2023-11-15 15:04:10 +08:00
sslapitest.c INIT 2023-11-15 15:04:10 +08:00
sslcorrupttest.c INIT 2023-11-15 15:04:10 +08:00
ssltest_old.c INIT 2023-11-15 15:04:10 +08:00
ssltestlib.c INIT 2023-11-15 15:04:10 +08:00
ssltestlib.h INIT 2023-11-15 15:04:10 +08:00
test.cnf INIT 2023-11-15 15:04:10 +08:00
testcrl.pem INIT 2023-11-15 15:04:10 +08:00
testdsa.pem INIT 2023-11-15 15:04:10 +08:00
testdsapub.pem INIT 2023-11-15 15:04:10 +08:00
testec-p256.pem INIT 2023-11-15 15:04:10 +08:00
testecpub-p256.pem INIT 2023-11-15 15:04:10 +08:00
testp7.pem INIT 2023-11-15 15:04:10 +08:00
testreq2.pem INIT 2023-11-15 15:04:10 +08:00
testrsa.pem INIT 2023-11-15 15:04:10 +08:00
testrsapub.pem INIT 2023-11-15 15:04:10 +08:00
testsid.pem INIT 2023-11-15 15:04:10 +08:00
testutil.c INIT 2023-11-15 15:04:10 +08:00
testutil.h INIT 2023-11-15 15:04:10 +08:00
testx509.pem INIT 2023-11-15 15:04:10 +08:00
threadstest.c INIT 2023-11-15 15:04:10 +08:00
v3-cert1.pem INIT 2023-11-15 15:04:10 +08:00
v3-cert2.pem INIT 2023-11-15 15:04:10 +08:00
v3ext.c INIT 2023-11-15 15:04:10 +08:00
v3nametest.c INIT 2023-11-15 15:04:10 +08:00
verify_extra_test.c INIT 2023-11-15 15:04:10 +08:00
versions.c INIT 2023-11-15 15:04:10 +08:00
wp_test.c INIT 2023-11-15 15:04:10 +08:00
x509_dup_cert_test.c INIT 2023-11-15 15:04:10 +08:00
x509_time_test.c INIT 2023-11-15 15:04:10 +08:00
x509aux.c INIT 2023-11-15 15:04:10 +08:00

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)