Skip to content

Commit

Permalink
tests: remove dependency on base64
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Gert Doering <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/search?l=mid&[email protected]
Signed-off-by: Gert Doering <[email protected]>
  • Loading branch information
syzzer authored and cron2 committed May 10, 2019
1 parent 19a22ac commit 90c61ef
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/t_lpback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.$$
Expand Down

0 comments on commit 90c61ef

Please sign in to comment.