]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add Travis build job building/testing mod_ssl against OpenSSL 3.
authorJoe Orton <jorton@apache.org>
Fri, 10 Dec 2021 17:17:37 +0000 (17:17 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 10 Dec 2021 17:17:37 +0000 (17:17 +0000)
Github: closes #282

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895787 13f79535-47bb-0310-9956-ffa450edef68

.travis.yml
test/travis_before_linux.sh
test/travis_run_linux.sh

index 8048230eecc63cfecba6d1dd0ab030c64bff6f79..d16117e3e0d923b03aaa72cc7ede54d7766f7365 100644 (file)
@@ -265,6 +265,11 @@ jobs:
            TEST_MALLOC=1 TEST_SSL=1
            CLEAR_CACHE=1
     # -------------------------------------------------------------------------
+    - name: Linux Ubuntu, Minimal module set, OpenSSL 3.x
+      env: APR_VERSION=trunk APR_CONFIG="--without-pgsql --without-mysql --without-odbc --with-crypto"
+           CONFIG="--enable-mods-shared=ssl --with-mpm=event"
+           TEST_MALLOC=1 TEST_SSL=1 TEST_OPENSSL3=3.0.0
+    # -------------------------------------------------------------------------
     - if: *condition_not_24x
       name: Linux Ubuntu, MPMs [event, worker], core + HTTP/2 test suite
       dist: focal
index 3a311e0effabe9744d29a75f6cb1140a55dd8ac6..072d8cac6c9d1179a1a1015d43794868344c6fca 100755 (executable)
@@ -113,8 +113,32 @@ if test -v TEST_SSL; then
     popd
 fi
 
+if test -v TEST_OPENSSL3; then
+    # Build the requested version of OpenSSL if it's not already
+    # installed in the cached ~/root
+    if ! test -f $HOME/root/openssl-is-${TEST_OPENSSL3}; then
+        mkdir -p build/openssl
+        pushd build/openssl
+           curl "https://www.openssl.org/source/openssl-${TEST_OPENSSL3}.tar.gz" |
+              tar -xzf -
+           cd openssl-${TEST_OPENSSL3}
+           ./Configure --prefix=$HOME/root/openssl3 shared no-tests
+           make $MFLAGS
+           make install_sw
+           touch $HOME/root/openssl-is-${TEST_OPENSSL3}
+       popd
+    fi
+    # Point APR at the installed version of OpenSSL.
+    if ! test -v APR_VERSION; then
+        : APR version must be specified to build with OpenSSL 3 to avoid mismatch with system libssl/crypto
+       exit 1
+    fi
+    APR_CONFIG="${APR_CONFIG} --with-openssl=$HOME/root/openssl3"
+fi
+
 if test -v APR_VERSION; then
     install_apx apr ${APR_VERSION} "${APR_CONFIG}"
+    ldd $HOME/root/apr-${APR_VERSION}/lib/libapr-?.so || true
     APU_CONFIG="$APU_CONFIG --with-apr=$HOME/root/apr-${APR_VERSION}"
 fi
 
index 9fc7bcace59324709af2507298f0f3922f210b00..9b0ce4bbbb19130ea7b0965f348a1f3740baf912 100755 (executable)
@@ -65,6 +65,11 @@ if test -v TEST_MOD_TLS; then
   CONFIG="$CONFIG --with-tls --with-rustls=$PREFIX"
 fi
 
+if test -v TEST_OPENSSL3; then
+    CONFIG="$CONFIG --with-ssl=$HOME/root/openssl3"
+    export LD_LIBRARY_PATH=$HOME/root/openssl3/lib:$HOME/root/openssl3/lib64
+fi
+
 srcdir=$PWD
 
 if test -v TEST_VPATH; then
@@ -134,6 +139,9 @@ if ! test -v SKIP_TESTING; then
             ./t/TEST -defines "TEST_SSL_DES3_KEY TEST_SSL_PASSPHRASE_EXEC" t/ssl
             RV=$?
 
+            # Log the OpenSSL version.
+            grep 'mod_ssl.*compiled against' t/logs/error_log | tail -n 1
+            
             # Test various session cache backends
             for cache in shmcb redis:localhost:6379 memcache:localhost:11211; do
                 test $RV -eq 0 || break