aboutsummaryrefslogtreecommitdiff
path: root/src/gns/gnunet-gns-proxy-setup-ca
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2019-01-25 20:52:55 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2019-01-25 20:52:55 +0100
commit7f666b4467ae5f530e904675df3f28886f4202fa (patch)
tree7bceb77a3b5de5fc8ec48bf8211d8bcd239f08fb /src/gns/gnunet-gns-proxy-setup-ca
parent92d1fd704da83c27e9aac3d385b8dd6cf0c18a8a (diff)
downloadgnunet-7f666b4467ae5f530e904675df3f28886f4202fa.tar.gz
gnunet-7f666b4467ae5f530e904675df3f28886f4202fa.zip
Fix #5514; Add test for GNS Proxy and DANE; Fix TLS connections on ports != 443 through proxy
Diffstat (limited to 'src/gns/gnunet-gns-proxy-setup-ca')
-rw-r--r--src/gns/gnunet-gns-proxy-setup-ca45
1 files changed, 22 insertions, 23 deletions
diff --git a/src/gns/gnunet-gns-proxy-setup-ca b/src/gns/gnunet-gns-proxy-setup-ca
index 52f4b012b..7c1d58dc2 100644
--- a/src/gns/gnunet-gns-proxy-setup-ca
+++ b/src/gns/gnunet-gns-proxy-setup-ca
@@ -5,12 +5,6 @@
5 5
6# TODO: We should sed the real paths to the binaries involved here. 6# TODO: We should sed the real paths to the binaries involved here.
7 7
8if ! which certutil > /dev/null
9then
10 echo "'certutil' command not found. Please install it."
11 exit 1
12fi
13
14if ! which openssl > /dev/null 8if ! which openssl > /dev/null
15then 9then
16 echo "'openssl' command not found. Please install it." 10 echo "'openssl' command not found. Please install it."
@@ -50,24 +44,29 @@ openssl rsa -passin pass:"GNU Name System" -in $GNSCAKY -out $GNSCANO
50echo "Making private key available to gnunet-gns-proxy" 44echo "Making private key available to gnunet-gns-proxy"
51cat $GNSCERT $GNSCANO > $GNS_CA_CERT_PEM 45cat $GNSCERT $GNSCANO > $GNS_CA_CERT_PEM
52 46
53echo "Importing CA into browsers" 47if ! which certutil > /dev/null
54for f in ~/.mozilla/firefox/*.*/ 48then
55do 49 echo "'certutil' command not found. Not importing into browsers."
56 if [ -d $f ]; then 50else
57 echo "Importing CA info Firefox at $f" 51 echo "Importing CA into browsers"
58# delete old certificate (if any) 52 for f in ~/.mozilla/firefox/*.*/
59 certutil -D -n "GNS Proxy CA" -d "$f" >/dev/null 2>/dev/null 53 do
60# add new certificate 54 if [ -d $f ]; then
61 certutil -A -n "GNS Proxy CA" -t CT,, -d "$f" < $GNSCERT 55 echo "Importing CA info Firefox at $f"
62 fi 56 # delete old certificate (if any)
63done 57 certutil -D -n "GNS Proxy CA" -d "$f" >/dev/null 2>/dev/null
58 # add new certificate
59 certutil -A -n "GNS Proxy CA" -t CT,, -d "$f" < $GNSCERT
60 fi
61 done
64 62
65if [ -d ~/.pki/nssdb/ ]; then 63 if [ -d ~/.pki/nssdb/ ]; then
66 echo "Importing CA into Chrome at ~/.pki/nssdb/" 64 echo "Importing CA into Chrome at ~/.pki/nssdb/"
67# delete old certificate (if any) 65 # delete old certificate (if any)
68 certutil -D -n "GNS Proxy CA" -d ~/.pki/nssdb/ >/dev/null 2>/dev/null 66 certutil -D -n "GNS Proxy CA" -d ~/.pki/nssdb/ >/dev/null 2>/dev/null
69# add new certificate 67 # add new certificate
70 certutil -A -n "GNS Proxy CA" -t CT,, -d ~/.pki/nssdb/ < $GNSCERT 68 certutil -A -n "GNS Proxy CA" -t CT,, -d ~/.pki/nssdb/ < $GNSCERT
69 fi
71fi 70fi
72 71
73echo "Cleaning up." 72echo "Cleaning up."