diff options
author | Willow Liquorice <willow@howhill.com> | 2022-08-29 22:01:18 +0100 |
---|---|---|
committer | Willow Liquorice <willow@howhill.com> | 2022-10-03 13:16:29 +0100 |
commit | 43b55e25e3824ea3bd9b4e10ee3dd2a5188b7f4c (patch) | |
tree | 8357efdb8fc09747562a1ae10d2f8e59f6a79623 /src/gns/test_proxy.sh | |
parent | 4611664be0ba79ec7029a74cf961f28f2a658241 (diff) | |
download | gnunet-43b55e25e3824ea3bd9b4e10ee3dd2a5188b7f4c.tar.gz gnunet-43b55e25e3824ea3bd9b4e10ee3dd2a5188b7f4c.zip |
-Removed references to explicit /tmp in test scripts and configurations in DHT, GNS, STATISTICS, and TRANSPORT subsystems.
Diffstat (limited to 'src/gns/test_proxy.sh')
-rwxr-xr-x | src/gns/test_proxy.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gns/test_proxy.sh b/src/gns/test_proxy.sh index ee288413f..720fe643d 100755 --- a/src/gns/test_proxy.sh +++ b/src/gns/test_proxy.sh | |||
@@ -1,9 +1,11 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | TEST_DOMAIN="www.test" | 3 | TEST_DOMAIN="www.test" |
4 | GNUNET_TMP="$(gnunet-config -f -s PATHS -o GNUNET_TMP)" | ||
5 | PROXY_CACERT="$(gnunet-config -f -c test_gnunet_proxy.conf -s gns-proxy -o PROXY_CACERT)" | ||
4 | 6 | ||
5 | # Delete old files before starting test | 7 | # Delete old files before starting test |
6 | rm -rf /tmp/gnunet/test-gnunet-gns-testing/ | 8 | rm -rf "$GNUNET_TMP/test-gnunet-gns-testing/" |
7 | gnunet-arm -s -c test_gns_proxy.conf | 9 | gnunet-arm -s -c test_gns_proxy.conf |
8 | gnunet-gns-proxy-setup-ca -c test_gns_proxy.conf | 10 | gnunet-gns-proxy-setup-ca -c test_gns_proxy.conf |
9 | 11 | ||
@@ -27,8 +29,9 @@ HEXCERT=`xxd -p local.der | tr -d '\n'` | |||
27 | #echo "This is the certificate the server does use: $HEXCERT" | 29 | #echo "This is the certificate the server does use: $HEXCERT" |
28 | BOXVALUE="6 8443 52 3 0 0 $HEXCERT" | 30 | BOXVALUE="6 8443 52 3 0 0 $HEXCERT" |
29 | 31 | ||
30 | cat local.crt > /tmp/server_cacert.pem | 32 | SERVER_CACERT="$GNUNET_TMP/server_cacert.pem" |
31 | cat local.key >> /tmp/server_cacert.pem | 33 | cat local.crt > "$SERVER_CACERT" |
34 | cat local.key >> "$SERVER_CACERT" | ||
32 | 35 | ||
33 | gnunet-identity -C test -c test_gns_proxy.conf | 36 | gnunet-identity -C test -c test_gns_proxy.conf |
34 | gnunet-namestore -p -z "test" -a -n www -t A -V 127.0.0.1 -e never -c test_gns_proxy.conf | 37 | gnunet-namestore -p -z "test" -a -n www -t A -V 127.0.0.1 -e never -c test_gns_proxy.conf |
@@ -38,13 +41,13 @@ gnunet-namestore -p -z "test" -a -n www -t BOX -V "$BOXVALUE" -e never -c test_g | |||
38 | 41 | ||
39 | gnunet-arm -i gns-proxy -c test_gns_proxy.conf | 42 | gnunet-arm -i gns-proxy -c test_gns_proxy.conf |
40 | 43 | ||
41 | #gnurl --socks5-hostname 127.0.0.1:7777 https://www.test -v --cacert /tmp/proxy_cacert.pem | 44 | #gnurl --socks5-hostname 127.0.0.1:7777 "https://$TEST_DOMAIN" -v --cacert "$PROXY_CACERT" |
42 | ./test_gns_proxy -A /tmp/proxy_cacert.pem -S /tmp/server_cacert.pem -p 8443 -c test_gns_proxy.conf | 45 | ./test_gns_proxy -A "$PROXY_CACERT" -S "$SERVER_CACERT" -p 8443 -c test_gns_proxy.conf |
43 | 46 | ||
44 | RES=$? | 47 | RES=$? |
45 | 48 | ||
46 | rm /tmp/proxy_cacert.pem | 49 | rm "$PROXY_CACERT" |
47 | rm /tmp/server_cacert.pem | 50 | rm "$SERVER_CACERT" |
48 | 51 | ||
49 | gnunet-arm -e test_gns_proxy.conf | 52 | gnunet-arm -e test_gns_proxy.conf |
50 | 53 | ||