Changeset 21181b2 in mod_gnutls


Ignore:
Timestamp:
Mar 14, 2016, 4:05:13 PM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, master, upstream
Children:
a0161fe
Parents:
c0c4106
Message:

Test suite: Enable OCSP if OpenSSL is available, provide port for responder

Tests must Define OCSP_PORT in their apache.conf to enable the OCSP
responder port.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    rc0c4106 r21181b2  
    8181               [test "$enable_flock" = "no" || test "$flock_works" = "no"])
    8282
    83 # TODO: check for openssl ocsp
    84 AM_CONDITIONAL([ENABLE_OCSP_TEST], [true])
     83# openssl is needed as the responder for OCSP tests
     84AC_PATH_PROG([OPENSSL], [openssl], [no])
     85AM_CONDITIONAL([ENABLE_OCSP_TEST], [test "${OPENSSL}" != "no"])
    8586
    8687dnl Enable test namespaces? Default is "yes".
     
    208209
    209210dnl Build list of "Listen" statements for Apache
    210 LISTEN_LIST="# Listen addresses for the test servers"
     211LISTEN_LIST="@%:@ Listen addresses for the test servers"
    211212for i in ${TEST_IP}; do
    212213        LISTEN_LIST="${LISTEN_LIST}
    213214Listen ${i}:\${TEST_PORT}"
    214215done
    215 dnl HTTP ports, only active if TEST_HTTP_PORT is defined
     216# Available extra ports, tests can "Define" variables of the listed
     217# names in their apache.conf to enable them.
     218for j in TEST_HTTP_PORT OCSP_PORT; do
    216219LISTEN_LIST="${LISTEN_LIST}
    217 <IfDefine TEST_HTTP_PORT>"
     220<IfDefine ${j}>"
    218221for i in ${TEST_IP}; do
    219222        LISTEN_LIST="${LISTEN_LIST}
    220         Listen ${i}:\${TEST_HTTP_PORT}"
     223        Listen ${i}:\${${j}}"
    221224done
    222225LISTEN_LIST="${LISTEN_LIST}
    223226</IfDefine>"
     227done
    224228AC_SUBST(LISTEN_LIST)
    225229AM_SUBST_NOTMAKE(LISTEN_LIST)
  • test/Makefile.am

    rc0c4106 r21181b2  
    188188# port for MSVA in test cases that use it
    189189MSVA_PORT ?= 9933
     190# port for OCSP server (Apache vhost if enabled)
     191if ENABLE_OCSP_TEST
     192OCSP_PORT ?= 9936
     193endif
    190194# maximum time to wait for MSVA startup (milliseconds)
    191195TEST_MSVA_MAX_WAIT ?= 10000
     
    213217endif
    214218
     219if ENABLE_OCSP_TEST
     220AM_TESTS_ENVIRONMENT += export OPENSSL="@OPENSSL@"; \
     221        export OCSP_PORT="$(OCSP_PORT)";
     222endif
     223
    215224if ENABLE_NETNS
    216225AM_TESTS_ENVIRONMENT += export UNSHARE="@UNSHARE@"; \
  • test/ocsp_server.conf

    rc0c4106 r21181b2  
    2020                SetEnv  OCSP_CERT       ${PWD}/ocsp-responder/x509.pem
    2121                SetEnv  OCSP_KEY        ${PWD}/ocsp-responder/secret.key
     22                <If "-n osenv('OPENSSL')">
     23                        # Pass OPENSSL variable to CGI script if set
     24                        SetEnv  OPENSSL         ${OPENSSL}
     25                </If>
    2226        </Location>
    2327        <Directory ${srcdir}/data>
Note: See TracChangeset for help on using the changeset viewer.