From 8da85aecffec86862a6429bec115dd6f8f852cf5 Mon Sep 17 00:00:00 2001 From: ng0 Date: Tue, 19 Feb 2019 16:40:15 +0000 Subject: fix mistakes which should not have happened --- src/gns/gnunet-gns-proxy-setup-ca.in | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/gns') diff --git a/src/gns/gnunet-gns-proxy-setup-ca.in b/src/gns/gnunet-gns-proxy-setup-ca.in index 00fc2d227..55a60e544 100644 --- a/src/gns/gnunet-gns-proxy-setup-ca.in +++ b/src/gns/gnunet-gns-proxy-setup-ca.in @@ -3,7 +3,6 @@ # and install it (for both GNUnet and your browser). # -# TODO: We should sed the real paths to the binaries involved here. OPENSSLCFG=@PREFIX@ if ! which openssl > /dev/null then @@ -11,10 +10,6 @@ then exit 1 fi -# Keep it simple so that people can install the tools later on. -OPENSSLBIN=openssl -CERTUTILBIN=certutil - echo "Generating CA" options='' while getopts "c:" opt; do @@ -39,10 +34,10 @@ GNSCANO=`mktemp /tmp/gnscakeynoencXXXXXX.pem` GNS_CA_CERT_PEM=`gnunet-config -s gns-proxy -o PROXY_CACERT -f $options` mkdir -p `dirname $GNS_CA_CERT_PEM` -OPENSSLBIN req -config $OPENSSLCFG -new -x509 -days 3650 -extensions v3_ca -keyout $GNSCAKY -out $GNSCERT -subj "/C=ZZ/L=World/O=GNU/OU=GNUnet/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNU Name System" +openssl req -config $OPENSSLCFG -new -x509 -days 3650 -extensions v3_ca -keyout $GNSCAKY -out $GNSCERT -subj "/C=ZZ/L=World/O=GNU/OU=GNUnet/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNU Name System" echo "Removing passphrase from key" -OPENSSLBIN rsa -passin pass:"GNU Name System" -in $GNSCAKY -out $GNSCANO +openssl rsa -passin pass:"GNU Name System" -in $GNSCAKY -out $GNSCANO echo "Making private key available to gnunet-gns-proxy" cat $GNSCERT $GNSCANO > $GNS_CA_CERT_PEM @@ -58,18 +53,18 @@ else if [ -d $f ]; then echo "Importing CA info Firefox at $f" # delete old certificate (if any) - @CERTUTILBIN@ -D -n "GNS Proxy CA" -d "$f" >/dev/null 2>/dev/null + certutil -D -n "GNS Proxy CA" -d "$f" >/dev/null 2>/dev/null # add new certificate - @CERTUTILBIN@ -A -n "GNS Proxy CA" -t CT,, -d "$f" < $GNSCERT + certutil -A -n "GNS Proxy CA" -t CT,, -d "$f" < $GNSCERT fi done if [ -d ~/.pki/nssdb/ ]; then echo "Importing CA into Chrome at ~/.pki/nssdb/" # delete old certificate (if any) - @CERTUTILBIN@ -D -n "GNS Proxy CA" -d ~/.pki/nssdb/ >/dev/null 2>/dev/null + certutil -D -n "GNS Proxy CA" -d ~/.pki/nssdb/ >/dev/null 2>/dev/null # add new certificate - @CERTUTILBIN@ -A -n "GNS Proxy CA" -t CT,, -d ~/.pki/nssdb/ < $GNSCERT + certutil -A -n "GNS Proxy CA" -t CT,, -d ~/.pki/nssdb/ < $GNSCERT fi fi -- cgit v1.2.3