From: Steffan Karger Date: Wed, 8 May 2019 13:52:20 +0000 (+0200) Subject: tests: remove dependency on base64 X-Git-Tag: v2.5_beta1~323 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=90c61ef3df7255637cf84b6a23e51742954acde8;p=thirdparty%2Fopenvpn.git tests: remove dependency on base64 Triggered by the report from Ilya, that if base64 is missing, the tests would still report success: Testing tls-crypt-v2 key generation (max length metadata)..../t_lpback.sh: base64: not found OK PASS: t_lpback.sh The easiest way to fix that, is to remove the dependency on base64 (which is it's current form wouldn't work on OSX anyway, because their base64 doesn't understand "-w0"). Signed-off-by: Steffan Karger Acked-by: Gert Doering Message-Id: URL: https://www.mail-archive.com/search?l=mid&q=E1hON0G-0007yB-3H@sfs-ml-4.v29.lw.sourceforge.com Signed-off-by: Gert Doering --- diff --git a/tests/t_lpback.sh b/tests/t_lpback.sh index fb43211d7..3b1e73a83 100755 --- a/tests/t_lpback.sh +++ b/tests/t_lpback.sh @@ -77,10 +77,17 @@ else echo "OK" fi +# Generate max-length base64 metadata ('A' is 0b000000 in base64) +METADATA="" +i=0 +while [ $i -lt 732 ]; do + METADATA="${METADATA}A" + i=$(expr $i + 1) +done echo -n "Testing tls-crypt-v2 key generation (max length metadata)..." "${top_builddir}/src/openvpn/openvpn" --tls-crypt-v2 tc-server-key.$$ \ - --tls-crypt-v2-genkey client tc-client-key.$$ \ - $(head -c732 /dev/zero | base64 -w0) >log.$$ 2>&1 + --tls-crypt-v2-genkey client tc-client-key.$$ "${METADATA}" \ + >log.$$ 2>&1 if [ $? != 0 ] ; then echo "FAILED" cat log.$$