Skip to contentSkip to conversation

add test case(s) to notice 'openvpn --show-cipher' crashing

PATCH In review Gert Doering 2 participants 3 messages Dec 10, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 add test case(s) to notice 'openvpn --show-cipher' crashing

---
 tests/t_lpback.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
tests/t_lpback.sh +6 -1
index 6206899d..67952994 100755
@@ -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}... "
Signature · 1 line
2.34.1
#2 lore raw
In reply to Gert Doering

Your patch has been applied to the master and release/2.5 branch (enhancing tests is always a good reason!).

commit b08b5f5df96dbe7d854a2fbbeb8a3e104e3158e2 (master) commit 1a744d1da6667506e6c201751834c768ac8a6e6f (release/2.5)

Author: Gert Doering
Date:   Fri Dec 10 17:55:43 2021 +0100
     add test case(s) to notice 'openvpn --show-cipher' crashing

     Signed-off-by: Gert Doering <[email protected]...>
     Acked-by: Arne Schwabe <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg23381.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering