Changeset ff039b1 in mod_gnutls


Ignore:
Timestamp:
Jan 9, 2020, 3:03:14 PM (7 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
master, proxy-ticket
Children:
478767a
Parents:
60ed7d1
Message:

Test suite: Replace softhsm.bash with Python code

With this all test scripts only call runtest.py.

Location:
test
Files:
3 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • test/Makefile.am

    r60ed7d1 rff039b1  
    6060# Python tools for tests
    6161noinst_PYTHON = https-test-client.py mgstest/http.py mgstest/__init__.py \
    62         mgstest/hooks.py mgstest/services.py mgstest/tests.py runtest.py \
    63         doctest-mgstest.py
     62        mgstest/hooks.py mgstest/services.py mgstest/softhsm.py \
     63        mgstest/tests.py runtest.py softhsm-init.py doctest-mgstest.py
    6464
    6565# Identities in the miniature CA, server, and client environment for
     
    249249
    250250EXTRA_DIST = $(apache_data) $(cert_templates) $(shared_identities:=/uid.in) \
    251         authority/server/crl.template softhsm.bash $(test_doc)
     251        authority/server/crl.template $(test_doc)
    252252
    253253# Lockfile for the main Apache process
  • test/test-24_pkcs11_cert.bash

    r60ed7d1 rff039b1  
    11#!/bin/bash
    2 
    3 testdir="$(dirname ${0})/tests/24_pkcs11_cert"
    4 
    5 # The Apache/SoftHSM configuration mixes up directories, so generate
    6 # config files with absolute paths to the token database from a
    7 # template. Generating them on every run avoids problems if the source
    8 # tree was moved.
    9 tmp_softhsm_conf="$(mktemp mod_gnutls_test-XXXXXX.conf)"
    10 function cleanup_tmpconf
    11 {
    12     rm "${tmp_softhsm_conf}"
    13 }
    14 trap cleanup_tmpconf EXIT
    15 
    16 cat - >"${tmp_softhsm_conf}" <<EOF
    17 objectstore.backend = file
    18 directories.tokendir = $(realpath $(pwd))/authority/server/softhsm2.db
    19 EOF
    20 export SOFTHSM2_CONF="${tmp_softhsm_conf}"
    21 
    22 echo "Generated temporary SoftHSM config ${tmp_softhsm_conf}:"
    23 cat "${tmp_softhsm_conf}"
    24 
    25 . $(dirname ${0})/softhsm.bash
    26 
    27 set -e
    28 
    29 ${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 24
    30 
    31 cleanup_tmpconf
    32 trap - EXIT
     2. ${srcdir}/netns_py.bash ${srcdir}/runtest.py --test-number 24
  • test/test_ca.mk

    r60ed7d1 rff039b1  
    8585        $(cert_rule)
    8686
    87 %/softhsm2.conf: %/secret.key
    88         echo "objectstore.backend = file" > $@
    89         echo "directories.tokendir = $(dir $@)softhsm2.db" >> $@
    90 
    91 %/softhsm2.db: %/x509.pem %/secret.key %/softhsm2.conf
    92         rm -rf $@
    93         mkdir -p $@
     87%/softhsm2.db: %/x509.pem %/secret.key
    9488        SOFTHSM="$(SOFTHSM)" \
    95         SOFTHSM2_CONF="$(dir $@)softhsm2.conf" \
    96         $(srcdir)/softhsm.bash init $(dir $@)secret.key $(dir $@)x509.pem
     89        $(PYTHON) $(srcdir)/softhsm-init.py --token-dir $@ --privkey $(dir $@)secret.key --certificate $(dir $@)x509.pem
    9790
    9891# Generate CRL revoking a certain certificate. Currently used to
  • test/tests/Makefile.am

    r60ed7d1 rff039b1  
    2424        22_TLS_reverse_proxy_crl_revoke/apache.conf 22_TLS_reverse_proxy_crl_revoke/backend.conf 22_TLS_reverse_proxy_crl_revoke/test.yml \
    2525        23_TLS_reverse_proxy_mismatched_priorities/apache.conf 23_TLS_reverse_proxy_mismatched_priorities/backend.conf 23_TLS_reverse_proxy_mismatched_priorities/test.yml \
    26         24_pkcs11_cert/apache.conf 24_pkcs11_cert/test.yml \
     26        24_pkcs11_cert/apache.conf 24_pkcs11_cert/hooks.py 24_pkcs11_cert/test.yml \
    2727        25_Disable_TLS_1.0/apache.conf 25_Disable_TLS_1.0/test.yml \
    2828        26_redirect_HTTP_to_HTTPS/apache.conf 26_redirect_HTTP_to_HTTPS/test.yml \
Note: See TracChangeset for help on using the changeset viewer.