all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 9d15875ec2b842c3a274e19b09a81f1d3fa23433 2343 bytes (raw)
name: gnu/packages/patches/gnunet-add-test-proxy.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
 
This file was missing from the 0.14.0 tarball.

Upstream bug URL:
https://bugs.gnunet.org/view.php?id=6690

diff --git a/src/gns/test_proxy.sh b/src/gns/test_proxy.sh
new file mode 100755
index 000000000..7c17cd4c5
--- /dev/null
+++ b/src/gns/test_proxy.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+# This file is in the public domain.
+TEST_DOMAIN="www.test"
+
+# Delete old files before starting test
+rm -rf /tmp/gnunet/test-gnunet-gns-testing/
+gnunet-arm -s -c test_gns_proxy.conf
+gnunet-gns-proxy-setup-ca -c test_gns_proxy.conf
+
+openssl genrsa -des3 -passout pass:xxxx -out server.pass.key 2048
+openssl rsa -passin pass:xxxx -in server.pass.key -out local.key
+rm server.pass.key
+openssl req -new -key local.key -out server.csr \
+  -subj "/C=DE/O=GNUnet/OU=GNS/CN=test.local"
+openssl x509 -req -days 1 -in server.csr -signkey local.key -out local.crt
+openssl x509 -in local.crt -out local.der -outform DER
+HEXCERT=`xxd -p local.der | tr -d '\n'`
+#echo "This is the certificate the server does not use: $HEXCERT"
+OLDBOXVALUE="6 8443 52 3 0 0 $HEXCERT"
+
+
+openssl req -new -key local.key -out server.csr \
+  -subj "/C=DE/O=GNUnet/OU=GNS/CN=test.local"
+openssl x509 -req -days 1 -in server.csr -signkey local.key -out local.crt
+openssl x509 -in local.crt -out local.der -outform DER
+HEXCERT=`xxd -p local.der | tr -d '\n'`
+#echo "This is the certificate the server does use: $HEXCERT"
+BOXVALUE="6 8443 52 3 0 0 $HEXCERT"
+
+cat local.crt > /tmp/server_cacert.pem
+cat local.key >> /tmp/server_cacert.pem
+
+gnunet-identity -C test -c test_gns_proxy.conf
+gnunet-namestore -p -z test -a -n www -t A -V 127.0.0.1 -e never -c test_gns_proxy.conf
+gnunet-namestore -p -z test -a -n www -t LEHO -V "test.local" -e never -c test_gns_proxy.conf
+gnunet-namestore -p -z test -a -n www -t BOX -V "$OLDBOXVALUE" -e never -c test_gns_proxy.conf
+gnunet-namestore -p -z test -a -n www -t BOX -V "$BOXVALUE" -e never -c test_gns_proxy.conf
+
+gnunet-arm -i gns-proxy -c test_gns_proxy.conf
+
+#gnurl --socks5-hostname 127.0.0.1:7777 https://www.test -v --cacert /tmp/proxy_cacert.pem
+./test_gns_proxy -A /tmp/proxy_cacert.pem -S /tmp/server_cacert.pem -p 8443 -c test_gns_proxy.conf
+
+RES=$?
+
+rm /tmp/proxy_cacert.pem
+rm /tmp/server_cacert.pem
+
+gnunet-arm -e test_gns_proxy.conf
+
+if test $RES != 0
+then
+  echo "Failed"
+  exit 1
+fi

debug log:

solving 9d15875ec2 ...
found 9d15875ec2 in https://yhetil.org/guix/7188d04d086a73dc2d59282a098eb1f0f24ef8ef.camel@telenet.be/

applying [1/1] https://yhetil.org/guix/7188d04d086a73dc2d59282a098eb1f0f24ef8ef.camel@telenet.be/
diff --git a/gnu/packages/patches/gnunet-add-test-proxy.patch b/gnu/packages/patches/gnunet-add-test-proxy.patch
new file mode 100644
index 0000000000..9d15875ec2

Checking patch gnu/packages/patches/gnunet-add-test-proxy.patch...
Applied patch gnu/packages/patches/gnunet-add-test-proxy.patch cleanly.

index at:
100644 9d15875ec2b842c3a274e19b09a81f1d3fa23433	gnu/packages/patches/gnunet-add-test-proxy.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.