4 openssl req -new -x509 -days 3650 -extensions v3_ca -keyout gnscakey.pem -out gnscacert.pem -subj "/C=TNR/L=World/O=GNU/OU=GNUnet/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNU Name System"
6 echo "Removing passphrase from key"
7 openssl rsa -passin pass:"GNU Name System" -in gnscakey.pem -out gnscakeynoenc.pem
9 cp gnscacert.pem $HOME/.gnunet/gns/gnscert.pem
10 cat gnscacert.pem > $HOME/.gnunet/gns/gnsCAcert.pem
11 cat gnscakeynoenc.pem >> $HOME/.gnunet/gns/gnsCAcert.pem
13 echo "Importing CA into browsers"
14 for f in ~/.mozilla/firefox/*.default
17 echo "Importing CA info firefox $f"
18 certutil -D -n "GNS Proxy CA" -d ~/.mozilla/firefox/*.default >/dev/null 2&>1
19 certutil -A -n "GNS Proxy CA" -t CT,, -d ~/.mozilla/firefox/*.default < gnscacert.pem
23 if [ -d ~/.pki/nssdb ]; then
24 echo "Importing CA into chrome"
25 certutil -D -n "GNS Proxy CA" -d ~/.pki/nssdb >/dev/null 2&>1
26 certutil -A -n "GNS Proxy CA" -t CT,, -d ~/.pki/nssdb < gnscacert.pem
30 rm gnscakey.pem gnscakeynoenc.pem gnscacert.pem
32 echo "You can now start gnunet-gns-proxy and configure your browser to use a SOCKS proxy on port 7777"