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 <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <E1hON0G-0007yB-3H@sfs-ml-4.v29.lw.sourceforge.com>
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 <gert@greenie.muc.de>
... | ... |
@@ -77,10 +77,17 @@ else |
77 | 77 |
echo "OK" |
78 | 78 |
fi |
79 | 79 |
|
80 |
+# Generate max-length base64 metadata ('A' is 0b000000 in base64) |
|
81 |
+METADATA="" |
|
82 |
+i=0 |
|
83 |
+while [ $i -lt 732 ]; do |
|
84 |
+ METADATA="${METADATA}A" |
|
85 |
+ i=$(expr $i + 1) |
|
86 |
+done |
|
80 | 87 |
echo -n "Testing tls-crypt-v2 key generation (max length metadata)..." |
81 | 88 |
"${top_builddir}/src/openvpn/openvpn" --tls-crypt-v2 tc-server-key.$$ \ |
82 |
- --tls-crypt-v2-genkey client tc-client-key.$$ \ |
|
83 |
- $(head -c732 /dev/zero | base64 -w0) >log.$$ 2>&1 |
|
89 |
+ --tls-crypt-v2-genkey client tc-client-key.$$ "${METADATA}" \ |
|
90 |
+ >log.$$ 2>&1 |
|
84 | 91 |
if [ $? != 0 ] ; then |
85 | 92 |
echo "FAILED" |
86 | 93 |
cat log.$$ |