--- /dev/null
+#!/bin/sh
+#
+# Install specified libcrypto.
+# -a : install version for ABI compatibility test.
+# -n : dry run, don't actually build and install.
+#
+# Usage: $0 [-a] [-n] openssl-$branch/tag destdir [config options]
+
+set -e
+
+bincompat_test=""
+dryrun=""
+while [ "$1" = "-a" ] || [ "$1" = "-n" ]; do
+ if [ "$1" = "-a" ]; then
+ abi_compat_test=y
+ elif [ "$1" = "-n" ]; then
+ dryrun="echo dryrun:"
+ fi
+ shift
+done
+
+ver="$1"
+destdir="$2"
+opts="$3"
+
+if [ -z "${ver}" ] || [ -z "${destdir}" ]; then
+ echo tag/branch and destdir required
+ exit 1
+fi
+
+set -x
+
+cd ${HOME}
+[ -d ${HOME}/openssl ] || git clone https://github.com/openssl/openssl.git
+cd ${HOME}/openssl
+git fetch --all
+
+if [ "${abi_compat_test}" = "y" ]; then
+ echo selecting ABI test release/branch for ${ver}
+ case "${ver}" in
+ openssl-3.6)
+ ver=openssl-3.0.0
+ echo "selecting older release ${ver}"
+ ;;
+ openssl-3.[012345])
+ major=$(echo ${ver} | cut -f1 -d.)
+ minor=$(echo ${ver} | cut -f2 -d.)
+ ver="${major}.$((${minor} + 1))"
+ echo selecting next release branch ${ver}
+ ;;
+ openssl-3.*.*)
+ major=$(echo ${ver} | cut -f1 -d.)
+ minor=$(echo ${ver} | cut -f2 -d.)
+ patch=$(echo ${ver} | cut -f3 -d.)
+ ver="${major}.${minor}.$((${patch} + 1))"
+ echo checking for release tag ${ver}
+ if git tag | grep -q "^${ver}\$"; then
+ echo selected next patch release ${ver}
+ else
+ ver="${major}.${minor}"
+ echo not found, selecting release branch ${ver}
+ fi
+ ;;
+ esac
+fi
+
+git checkout ${ver}
+make clean >/dev/null 2>&1 || true
+${dryrun} ./config no-threads shared ${opts} --prefix=${destdir}
+${dryrun} make -j4
+${dryrun} sudo make install_sw
${env} make ${TEST_TARGET} SKIP_LTESTS="${SKIP_LTESTS}" LTESTS="${LTESTS}"
fi
-# Replace our self-built with the distro-provided one before running the tests
-# again.
-case "$1" in
- openssl-3.*)
- ${SUDO} cp /lib/x86_64-linux-gnu/libcrypto.so.3 /opt/openssl/lib64/libcrypto.so.3
- if [ -z "${TEST_SSH_SSHD_CONFOPTS}" ]; then
- SSHD_CONFOPTS=AcceptEnv=OpenSSL3_ABI_Test
- fi
- ;;
-esac
-
if [ ! -z "${SSHD_CONFOPTS}" ]; then
echo "rerunning t-exec with TEST_SSH_SSHD_CONFOPTS='${SSHD_CONFOPTS}'"
if [ -z "${LTESTS}" ]; then
fi
if [ ! -z "${INSTALL_OPENSSL}" ]; then
- (cd ${HOME} &&
- git clone https://github.com/openssl/openssl.git &&
- cd ${HOME}/openssl &&
- git checkout ${INSTALL_OPENSSL} &&
- ./config no-threads shared ${SSLCONFOPTS} \
- --prefix=/opt/openssl &&
- make -j4 && sudo make install_sw)
+ .github/install_libcrypto.sh \
+ "${INSTALL_OPENSSL}" /opt/openssl "${SSLCONFOPTS}"
fi
if [ ! -z "${INSTALL_LIBRESSL}" ]; then
TEST_SSH_UNSAFE_PERMISSIONS: 1
TEST_SSH_HOSTBASED_AUTH: yes
LTESTS: ${{ vars.LTESTS }}
+ - name: test OpenSSL3 ABI compatibility
+ if: ${{ startsWith(matrix.config, 'openssl-3') }}
+ run: |
+ sh .github/install_libcrypto.sh -a ${{ matrix.config }} /opt/openssl
+ sh .github/run_test.sh ${{ matrix.config }}
- name: show logs
if: failure()
run: for i in regress/failed*.log; do echo ====; echo logfile $i; echo =====; cat $i; done