]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix t_lpback.sh platform-dependent failures
authorGert Doering <gert@greenie.muc.de>
Tue, 8 Jul 2014 14:45:58 +0000 (16:45 +0200)
committerGert Doering <gert@greenie.muc.de>
Tue, 8 Jul 2014 19:06:14 +0000 (21:06 +0200)
commit e97aa06dc058 introduced "full openvpn cipher testing", but fails
on OpenSSL 0.9.8 with DES-CFB1 (skip), on NetBSD for RC5-* (needs extra
library, libcrypto_rc5.a) and on Solaris for POSIXly "tail" (rewrite).

Signed-off-by: Gert Doering <gert@greenie.muc.de>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <1404830758-7927-1-git-send-email-gert@greenie.muc.de>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8861
(cherry picked from commit bbae238d5084012525a61a0e3ab947c414a555ae)

tests/t_lpback.sh

index c2247976e0c5281e67e64a93344119daea0435b4..8f88ad926a297c8c50115d5b9bf20deaddfc0269 100755 (executable)
@@ -25,12 +25,15 @@ trap "rm -f key.$$ log.$$ ; trap 0 ; exit 77" 1 2 15
 trap "rm -f key.$$ log.$$ ; exit 1" 0 3
 
 # Get list of supported ciphers from openvpn --show-ciphers output
-CIPHERS=$(${top_builddir}/src/openvpn/openvpn --show-ciphers | tail -n+7 | sed 's/ .*//' | sed '/^\s*$/d' | sort)
+CIPHERS=$(${top_builddir}/src/openvpn/openvpn --show-ciphers | \
+            sed -e '1,/^$/d' -e s'/ .*//' -e '/^\s*$/d' | sort)
 
 # SK, 2014-06-04: currently the DES-EDE3-CFB1 implementation of OpenSSL is
 # broken (see http://rt.openssl.org/Ticket/Display.html?id=2867), so exclude
 # that cipher from this test.
-CIPHERS=$(echo "$CIPHERS" | sed '/.*DES-EDE3-CFB1.*/d')
+# GD, 2014-07-06 so is DES-CFB1
+# 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-)' )
 
 "${top_builddir}/src/openvpn/openvpn" --genkey --secret key.$$
 set +e