]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
add test case(s) to notice 'openvpn --show-cipher' crashing
authorGert Doering <gert@greenie.muc.de>
Fri, 10 Dec 2021 16:55:43 +0000 (17:55 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 10 Dec 2021 17:08:33 +0000 (18:08 +0100)
Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Arne Schwabe <arne@rfc2549.org>
Message-Id: <20211210165543.77587-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23381.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
tests/t_lpback.sh

index 6206899d3b39c9b201cea5056006c9e202cc509d..67952994245304801b3aa5658901fa070769ebea 100755 (executable)
@@ -35,13 +35,18 @@ CIPHERS=$(${top_builddir}/src/openvpn/openvpn --show-ciphers | \
 # GD, 2014-07-06 do not test RC5-* either (fails on NetBSD w/o libcrypto_rc5)
 CIPHERS=$(echo "$CIPHERS" | egrep -v '^(DES-EDE3-CFB1|DES-CFB1|RC5-)' )
 
+e=0
+if [ -z "$CIPHERS" ] ; then
+    echo "'openvpn --show-ciphers' FAILED (empty list)"
+    e=1
+fi
+
 # Also test cipher 'none'
 CIPHERS=${CIPHERS}$(printf "\nnone")
 
 "${top_builddir}/src/openvpn/openvpn" --genkey secret key.$$
 set +e
 
-e=0
 for cipher in ${CIPHERS}
 do
     printf "Testing cipher ${cipher}... "