From 6a6de959bb4c4d897bf8e3929c6ac4c629e5305b Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 7 Apr 2021 16:57:18 +0100 Subject: [PATCH] Fix key filename mangling in auth-certificate test We want to strip the -key-xxx.yyy suffix from the key filename and replace it with -cert.pem to find the corresponding certificate. The original implementation was stripping all from the first - but that fails when ${srcdir} contains a hyphen, so fix it up to be more precise. Signed-off-by: David Woodhouse --- tests/auth-certificate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auth-certificate b/tests/auth-certificate index 615d5f20..7cd2785e 100755 --- a/tests/auth-certificate +++ b/tests/auth-certificate @@ -38,7 +38,7 @@ for KEY in ${key_list}; do if [ "${KEY%%.p12}" != "${KEY}" ]; then CERTARGS="-c ${KEY} --key-password password" else - CERTARGS="--sslkey ${KEY} --key-password password -c ${KEY%%-*}-cert.pem " + CERTARGS="--sslkey ${KEY} --key-password password -c ${KEY%-key-*}-cert.pem " fi ( echo "test" | LD_PRELOAD=libsocket_wrapper.so $OPENCONNECT -q $ADDRESS:443 -u test $CERTARGS --servercert=d66b507ae074d03b02eafca40d35f87dd81049d3 --cookieonly --passwd-on-stdin ) || fail $PID "Could not connect with key ${KEY##*/}!" -- 2.50.1