From: Martin Schanzenbach Date: Tue, 12 Jun 2012 10:41:06 +0000 (+0000) Subject: -fixes X-Git-Tag: initial-import-from-subversion-38251~13133 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cea0cc4df6ac1a0c5c062dfc325b7e704b3f556d;p=oweals%2Fgnunet.git -fixes --- diff --git a/src/gns/createProxyCa.sh b/src/gns/createProxyCa.sh deleted file mode 100644 index 43855241e..000000000 --- a/src/gns/createProxyCa.sh +++ /dev/null @@ -1,20 +0,0 @@ -echo "Generating CA" - -openssl req -new -x509 -days 3650 -extensions v3_ca -keyout gnscakey.pem -out gnscacert.pem -subj "/C=DE/ST=Bavaria/L=Munich/O=TUM/OU=IN/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNUnet Naming System" - -echo "Removing passphrase from key" -openssl rsa -passin pass:"GNUnet Naming System" -in gnscakey.pem -out gnscakeynoenc.pem - -cp gnscacert.pem $HOME/.gnunet/gns/gnscert.pem -cat gnscacert.pem >> $HOME/.gnunet/gns/gnsCAcert.pem -cat gnscakeynoenc.pem >> $HOME/.gnunet/gns/gnsCAcert.pem -cat gnscakey.pem -cat gnscacert.pem - -echo "Cleaning up" -rm gnscakey.pem gnscakeynoenc.pem gnscacert.pem - -echo "Next steps:" -echo "1. The new CA will be used automatically by the proxy with the default settings" -echo "2. Please import the certificate $HOME/.gnunet/gns/gnscert.pem into the browser of your choice" -echo "3. Start gnunet-gns-proxy and configure your broser to use a SOCKS proxy on port 7777" diff --git a/src/gns/gnunet-gns-proxy-setup-ca b/src/gns/gnunet-gns-proxy-setup-ca new file mode 100644 index 000000000..019db0763 --- /dev/null +++ b/src/gns/gnunet-gns-proxy-setup-ca @@ -0,0 +1,17 @@ +echo "Generating CA" + +openssl req -new -x509 -days 3650 -extensions v3_ca -keyout gnscakey.pem -out gnscacert.pem -subj "/C=DE/ST=Bavaria/L=Munich/O=TUM/OU=IN/CN=GNS Proxy CA/emailAddress=bounce@gnunet.org" -passout pass:"GNUnet Naming System" + +echo "Removing passphrase from key" +openssl rsa -passin pass:"GNUnet Naming System" -in gnscakey.pem -out gnscakeynoenc.pem + +cp gnscacert.pem $HOME/.gnunet/gns/gnscert.pem +cat gnscacert.pem > $HOME/.gnunet/gns/gnsCAcert.pem +cat gnscakeynoenc.pem >> $HOME/.gnunet/gns/gnsCAcert.pem + +rm gnscakey.pem gnscakeynoenc.pem gnscacert.pem + +echo "Next steps:" +echo "1. The new CA will be used automatically by the proxy with the default settings" +echo "2. Please import the certificate $HOME/.gnunet/gns/gnscert.pem into the browser of your choice" +echo "3. Start gnunet-gns-proxy and configure your broser to use a SOCKS proxy on port 7777" diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index 790a9f474..d6e5ba3d1 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -2380,8 +2380,7 @@ run (void *cls, char *const *args, const char *cfgfile, load_cert_from_file (proxy_ca.cert, cafile); load_key_from_file (proxy_ca.key, cafile); - if (cafile_cfg) - GNUNET_free (cafile_cfg); + GNUNET_free_non_null (cafile_cfg); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Loading Template\n");