[NLUUG]   Welcome to ftp.nluug.nl
Current directory: /ftp/NetBSD/NetBSD-current/src/crypto/external/bsd/openssl.old/dist/test/
 
Current bandwidth utilization 1458.59 Mbit/s
Bandwidth utilization bar
Contents of 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.


Icon  Name                                                                 Last modified      Size  
[DIR] Parent Directory - [DIR] CVS/ 19-Apr-2023 05:02 - [DIR] certs/ 19-Apr-2023 05:00 - [DIR] ct/ 19-Apr-2023 05:00 - [DIR] d2i-tests/ 19-Apr-2023 05:00 - [DIR] ocsp-tests/ 19-Apr-2023 05:00 - [DIR] ossl_shim/ 19-Apr-2023 05:00 - [DIR] recipes/ 19-Apr-2023 05:00 - [DIR] smime-certs/ 19-Apr-2023 05:00 - [DIR] ssl-tests/ 19-Apr-2023 05:00 - [DIR] testutil/ 19-Apr-2023 05:00 - [TXT] CAss.cnf 19-Apr-2023 05:00 2.2K [   ] CAssdh.cnf 03-Feb-2018 23:43 728 [   ] CAssdsa.cnf 03-Feb-2018 23:43 729 [   ] CAssrsa.cnf 03-Feb-2018 23:43 708 [TXT] CAtsa.cnf 19-Apr-2023 05:00 4.9K [   ] P1ss.cnf 19-Apr-2023 05:00 1.0K [   ] P2ss.cnf 19-Apr-2023 05:00 1.1K [TXT] README 18-Apr-2023 16:19 4.4K [TXT] README.external 18-Apr-2023 16:19 4.6K [TXT] README.ssltest.md 18-Apr-2023 16:19 10K [   ] Sssdsa.cnf 03-Feb-2018 23:43 821 [   ] Sssrsa.cnf 03-Feb-2018 23:43 798 [   ] Uss.cnf 19-Apr-2023 05:00 1.0K [TXT] aborttest.c 18-Apr-2023 16:19 464 [TXT] afalgtest.c 18-Apr-2023 16:19 4.2K [TXT] asn1_decode_test.c 18-Apr-2023 16:19 6.3K [TXT] asn1_encode_test.c 18-Apr-2023 16:19 30K [TXT] asn1_internal_test.c 18-Apr-2023 16:19 3.7K [TXT] asn1_string_table_test.c 18-Apr-2023 16:19 1.9K [TXT] asn1_time_test.c 18-Apr-2023 16:19 16K [TXT] asynciotest.c 18-Apr-2023 16:19 12K [TXT] asynctest.c 18-Apr-2023 16:19 8.7K [TXT] bad_dtls_test.c 18-Apr-2023 16:19 19K [TXT] bftest.c 18-Apr-2023 16:19 15K [TXT] bio_callback_test.c 18-Apr-2023 16:19 6.4K [TXT] bio_enc_test.c 18-Apr-2023 16:19 6.7K [TXT] bio_memleak_test.c 18-Apr-2023 16:19 7.5K [TXT] bioprinttest.c 18-Apr-2023 16:19 11K [TXT] bntest.c 18-Apr-2023 16:19 92K [TXT] bntests.pl 18-Apr-2023 16:19 4.5K [TXT] build.info 18-Apr-2023 16:19 20K [TXT] casttest.c 18-Apr-2023 16:19 3.1K [TXT] chacha_internal_test.c 18-Apr-2023 16:19 8.0K [TXT] cipher_overhead_test.c 18-Apr-2023 16:19 1.1K [TXT] cipherbytes_test.c 18-Apr-2023 16:19 4.4K [TXT] cipherlist_test.c 18-Apr-2023 16:19 7.1K [TXT] ciphername_test.c 18-Apr-2023 16:19 21K [TXT] clienthellotest.c 18-Apr-2023 16:19 8.3K [TXT] cmactest.c 18-Apr-2023 16:19 5.9K [TXT] cms-examples.pl 19-Apr-2023 05:00 8.7K [TXT] cmsapitest.c 18-Apr-2023 16:19 2.2K [TXT] conf_include_test.c 18-Apr-2023 16:19 5.4K [TXT] constant_time_test.c 18-Apr-2023 16:19 12K [TXT] crltest.c 18-Apr-2023 16:19 15K [TXT] ct_test.c 18-Apr-2023 16:19 16K [TXT] ctype_internal_test.c 18-Apr-2023 16:19 2.6K [TXT] curve448_internal_test.c 18-Apr-2023 16:19 35K [TXT] d2i_test.c 18-Apr-2023 16:19 4.0K [TXT] dane-cross.in 18-Apr-2023 16:19 6.9K [TXT] danetest.c 18-Apr-2023 16:19 11K [TXT] danetest.in 18-Apr-2023 16:19 88K [   ] danetest.pem 18-Apr-2023 16:19 652 [   ] data.bin 18-Apr-2023 16:19 128 [TXT] destest.c 18-Apr-2023 16:19 25K [TXT] dhtest.c 18-Apr-2023 16:19 27K [TXT] drbg_cavs_data.c 18-Apr-2023 16:19 7.9M [TXT] drbg_cavs_data.h 18-Apr-2023 16:19 1.8K [TXT] drbg_cavs_test.c 18-Apr-2023 16:19 7.5K [TXT] drbgtest.c 18-Apr-2023 16:19 30K [TXT] drbgtest.h 18-Apr-2023 16:19 26K [TXT] dsa_no_digest_size_test.c 18-Apr-2023 16:19 8.4K [TXT] dsatest.c 18-Apr-2023 16:19 3.7K [TXT] dtls_mtu_test.c 18-Apr-2023 16:19 7.1K [TXT] dtlstest.c 18-Apr-2023 16:19 13K [TXT] dtlsv1listentest.c 18-Apr-2023 16:19 12K [TXT] ec_internal_test.c 18-Apr-2023 16:19 12K [TXT] ecdsatest.c 18-Apr-2023 16:19 11K [TXT] ecdsatest.h 18-Apr-2023 16:19 674K [TXT] ecstresstest.c 18-Apr-2023 16:19 3.9K [TXT] ectest.c 18-Apr-2023 16:19 91K [TXT] enginetest.c 18-Apr-2023 16:19 11K [TXT] errtest.c 18-Apr-2023 16:19 941 [TXT] evp_extra_test.c 18-Apr-2023 16:19 71K [TXT] evp_test.c 18-Apr-2023 16:19 73K [TXT] evp_test.h 18-Apr-2023 16:19 413 [TXT] exdatatest.c 18-Apr-2023 16:19 6.7K [TXT] exptest.c 18-Apr-2023 16:19 6.1K [TXT] fatalerrtest.c 18-Apr-2023 16:19 2.7K [TXT] generate_buildtest.pl 18-Apr-2023 16:19 793 [TXT] generate_ssl_tests.pl 18-Apr-2023 16:19 4.4K [TXT] gmdifftest.c 18-Apr-2023 16:19 1.8K [TXT] gosttest.c 18-Apr-2023 16:19 3.1K [TXT] handshake_helper.c 18-Apr-2023 16:19 60K [TXT] handshake_helper.h 18-Apr-2023 16:19 2.9K [TXT] hmactest.c 18-Apr-2023 16:19 7.2K [TXT] ideatest.c 18-Apr-2023 16:19 3.7K [TXT] igetest.c 19-Apr-2023 05:00 16K [TXT] lhash_test.c 18-Apr-2023 16:19 5.5K [TXT] md2test.c 18-Apr-2023 16:19 1.6K [TXT] mdc2_internal_test.c 18-Apr-2023 16:19 1.6K [TXT] mdc2test.c 18-Apr-2023 16:19 2.0K [TXT] memleaktest.c 18-Apr-2023 16:19 1.6K [TXT] modes_internal_test.c 18-Apr-2023 16:19 29K [TXT] ocspapitest.c 18-Apr-2023 16:19 5.9K [TXT] packettest.c 18-Apr-2023 16:19 15K [TXT] pbelutest.c 18-Apr-2023 16:19 1.4K [TXT] pemtest.c 18-Apr-2023 16:19 3.4K [   ] pkcs7-1.pem 03-Feb-2018 23:43 851 [   ] pkcs7.pem 03-Feb-2018 23:43 3.7K [TXT] pkey_meth_kdf_test.c 18-Apr-2023 16:19 5.2K [TXT] pkey_meth_test.c 18-Apr-2023 16:19 2.2K [TXT] pkits-test.pl 19-Apr-2023 05:00 31K [TXT] poly1305_internal_test.c 18-Apr-2023 16:19 56K [TXT] rc2test.c 18-Apr-2023 16:19 2.0K [TXT] rc4test.c 18-Apr-2023 16:19 3.9K [TXT] rc5test.c 18-Apr-2023 16:19 8.8K [TXT] rdrand_sanitytest.c 18-Apr-2023 16:19 3.4K [TXT] recordlentest.c 18-Apr-2023 16:19 5.1K [TXT] rsa_complex.c 18-Apr-2023 16:19 787 [TXT] rsa_mp_test.c 18-Apr-2023 16:19 9.5K [TXT] rsa_test.c 18-Apr-2023 16:19 13K [TXT] run_tests.pl 18-Apr-2023 16:19 4.0K [TXT] sanitytest.c 18-Apr-2023 16:19 3.0K [TXT] secmemtest.c 18-Apr-2023 16:19 5.9K [   ] serverinfo.pem 03-Feb-2018 23:43 740 [   ] serverinfo2.pem 18-Apr-2023 16:19 412 [TXT] servername_test.c 18-Apr-2023 16:19 6.7K [   ] session.pem 18-Apr-2023 16:19 1.9K [   ] shibboleth.pfx 18-Apr-2023 16:19 2.5K [TXT] shlibloadtest.c 18-Apr-2023 16:19 9.1K [TXT] siphash_internal_test.c 18-Apr-2023 16:19 17K [TXT] sm2_internal_test.c 18-Apr-2023 16:19 13K [TXT] sm4_internal_test.c 18-Apr-2023 16:19 2.3K [TXT] smcont.txt 19-Apr-2023 05:00 83 [TXT] srptest.c 18-Apr-2023 16:19 8.0K [TXT] ssl_cert_table_internal_test.c 18-Apr-2023 16:19 2.3K [TXT] ssl_ctx_test.c 18-Apr-2023 16:19 2.3K [TXT] ssl_test.c 18-Apr-2023 16:19 18K [TXT] ssl_test.tmpl 18-Apr-2023 16:19 4.3K [TXT] ssl_test_ctx.c 18-Apr-2023 16:19 29K [TXT] ssl_test_ctx.h 18-Apr-2023 16:19 8.5K [TXT] ssl_test_ctx_test.c 18-Apr-2023 16:19 9.0K [   ] ssl_test_ctx_test.conf 18-Apr-2023 16:19 2.0K [TXT] sslapitest.c 18-Apr-2023 16:19 249K [TXT] sslbuffertest.c 18-Apr-2023 16:19 5.2K [TXT] sslcorrupttest.c 18-Apr-2023 16:19 7.0K [TXT] ssltest_old.c 18-Apr-2023 16:19 103K [TXT] ssltestlib.c 19-Apr-2023 05:00 29K [TXT] ssltestlib.h 19-Apr-2023 05:00 2.0K [TXT] stack_test.c 18-Apr-2023 16:19 9.2K [   ] sysdefault.cnf 18-Apr-2023 16:19 241 [TXT] sysdefaulttest.c 18-Apr-2023 16:19 1.1K [TXT] test.cnf 19-Apr-2023 05:00 2.6K [TXT] test_test.c 18-Apr-2023 16:19 18K [   ] testcrl.pem 03-Feb-2018 23:43 938 [   ] testdsa.pem 18-Apr-2023 16:19 672 [   ] testdsapub.pem 18-Apr-2023 16:19 654 [   ] testec-p256.pem 18-Apr-2023 16:19 227 [   ] testecpub-p256.pem 18-Apr-2023 16:19 178 [   ] tested448.pem 18-Apr-2023 16:19 156 [   ] tested448pub.pem 18-Apr-2023 16:19 146 [   ] tested25519.pem 18-Apr-2023 16:19 119 [   ] tested25519pub.pem 18-Apr-2023 16:19 113 [   ] testp7.pem 03-Feb-2018 23:43 2.8K [   ] testreq2.pem 03-Feb-2018 23:43 371 [   ] testrsa.pem 03-Feb-2018 23:43 497 [   ] testrsa_withattrs.der 18-Apr-2023 16:19 1.2K [   ] testrsa_withattrs.pem 18-Apr-2023 16:19 1.7K [   ] testrsapub.pem 18-Apr-2023 16:19 182 [   ] testsid.pem 19-Apr-2023 05:00 2.3K [TXT] testutil.h 19-Apr-2023 05:00 19K [   ] testx509.pem 03-Feb-2018 23:43 530 [TXT] threadstest.c 18-Apr-2023 16:19 3.9K [TXT] time_offset_test.c 18-Apr-2023 16:19 3.2K [TXT] tls13ccstest.c 18-Apr-2023 16:19 15K [TXT] tls13encryptiontest.c 18-Apr-2023 16:19 14K [TXT] tls13secretstest.c 18-Apr-2023 16:19 11K [TXT] uitest.c 18-Apr-2023 16:19 2.3K [   ] v3-cert1.pem 03-Feb-2018 23:43 944 [   ] v3-cert2.pem 03-Feb-2018 23:43 940 [TXT] v3ext.c 18-Apr-2023 16:19 11K [TXT] v3nametest.c 18-Apr-2023 16:19 20K [TXT] verify_extra_test.c 18-Apr-2023 16:19 8.6K [TXT] versions.c 18-Apr-2023 16:19 645 [TXT] wpackettest.c 18-Apr-2023 16:19 15K [TXT] x509_check_cert_pkey_test.c 18-Apr-2023 16:19 3.0K [TXT] x509_dup_cert_test.c 18-Apr-2023 16:19 1.3K [TXT] x509_internal_test.c 18-Apr-2023 16:19 3.1K [TXT] x509_time_test.c 18-Apr-2023 16:19 14K [TXT] x509aux.c 18-Apr-2023 16:19 5.1K

NLUUG - Open Systems. Open Standards
Become a member and get discounts on conferences and more, see the NLUUG website!