diff options
Diffstat (limited to 'src/gns/test_proxy.sh')
-rwxr-xr-x | src/gns/test_proxy.sh | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/src/gns/test_proxy.sh b/src/gns/test_proxy.sh deleted file mode 100755 index ee288413f..000000000 --- a/src/gns/test_proxy.sh +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | # This file is in the public domain. | ||
3 | TEST_DOMAIN="www.test" | ||
4 | |||
5 | # Delete old files before starting test | ||
6 | rm -rf /tmp/gnunet/test-gnunet-gns-testing/ | ||
7 | gnunet-arm -s -c test_gns_proxy.conf | ||
8 | gnunet-gns-proxy-setup-ca -c test_gns_proxy.conf | ||
9 | |||
10 | openssl genrsa -des3 -passout pass:xxxx -out server.pass.key 2048 | ||
11 | openssl rsa -passin pass:xxxx -in server.pass.key -out local.key | ||
12 | rm server.pass.key | ||
13 | openssl req -new -key local.key -out server.csr \ | ||
14 | -subj "/C=DE/O=GNUnet/OU=GNS/CN=test.local" | ||
15 | openssl x509 -req -days 1 -in server.csr -signkey local.key -out local.crt | ||
16 | openssl x509 -in local.crt -out local.der -outform DER | ||
17 | HEXCERT=`xxd -p local.der | tr -d '\n'` | ||
18 | #echo "This is the certificate the server does not use: $HEXCERT" | ||
19 | OLDBOXVALUE="6 8443 52 3 0 0 $HEXCERT" | ||
20 | |||
21 | |||
22 | openssl req -new -key local.key -out server.csr \ | ||
23 | -subj "/C=DE/O=GNUnet/OU=GNS/CN=test.local" | ||
24 | openssl x509 -req -days 1 -in server.csr -signkey local.key -out local.crt | ||
25 | openssl x509 -in local.crt -out local.der -outform DER | ||
26 | HEXCERT=`xxd -p local.der | tr -d '\n'` | ||
27 | #echo "This is the certificate the server does use: $HEXCERT" | ||
28 | BOXVALUE="6 8443 52 3 0 0 $HEXCERT" | ||
29 | |||
30 | cat local.crt > /tmp/server_cacert.pem | ||
31 | cat local.key >> /tmp/server_cacert.pem | ||
32 | |||
33 | 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 | ||
35 | gnunet-namestore -p -z "test" -a -n www -t LEHO -V "test.local" -e never -c test_gns_proxy.conf | ||
36 | gnunet-namestore -p -z "test" -a -n www -t BOX -V "$OLDBOXVALUE" -e never -c test_gns_proxy.conf | ||
37 | gnunet-namestore -p -z "test" -a -n www -t BOX -V "$BOXVALUE" -e never -c test_gns_proxy.conf | ||
38 | |||
39 | gnunet-arm -i gns-proxy -c test_gns_proxy.conf | ||
40 | |||
41 | #gnurl --socks5-hostname 127.0.0.1:7777 https://www.test -v --cacert /tmp/proxy_cacert.pem | ||
42 | ./test_gns_proxy -A /tmp/proxy_cacert.pem -S /tmp/server_cacert.pem -p 8443 -c test_gns_proxy.conf | ||
43 | |||
44 | RES=$? | ||
45 | |||
46 | rm /tmp/proxy_cacert.pem | ||
47 | rm /tmp/server_cacert.pem | ||
48 | |||
49 | gnunet-arm -e test_gns_proxy.conf | ||
50 | |||
51 | if test $RES != 0 | ||
52 | then | ||
53 | echo "Failed" | ||
54 | exit 1 | ||
55 | fi | ||