From a8239e3ab2a98fd6ddbf4e43b18dafa894fe641f Mon Sep 17 00:00:00 2001 From: ng0 Date: Fri, 15 Mar 2019 11:03:12 +0000 Subject: [PATCH] gnunet-gns-proxy-setup-ca: replace which(1) usage. --- src/gns/gnunet-gns-proxy-setup-ca.in | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/gns/gnunet-gns-proxy-setup-ca.in b/src/gns/gnunet-gns-proxy-setup-ca.in index f3a1f58e1..e9ee5e395 100644 --- a/src/gns/gnunet-gns-proxy-setup-ca.in +++ b/src/gns/gnunet-gns-proxy-setup-ca.in @@ -252,8 +252,24 @@ generate_ca() # GNSCANO=`mktemp ${00##*/}.pem` || exit 1 # fi + # # ------------- gnutls + # + # if ! which certutil > /dev/null + # then + # warningmsg "The 'certutil' command was not found." + # warningmsg "Not importing into browsers." + # warningmsg "For 'certutil' install nss." + # else + # # Generate CA key + # # pkcs#8 password-protects key + # certtool --pkcs8 --generate-privkey --sec-param high --outfile ca-key.pem + # # self-sign the CA to create public certificate + # certtool --generate-self-signed --load-privkey ca-key.pem --template ca.cfg --outfile ca.pem + + # ------------- openssl + OPENSSLCFG=@pkgdatadir@/openssl.cnf - if ! which openssl > /dev/null + if test -z "`openssl version`" > /dev/null then warningmsg "'openssl' command not found. Please install it." infomsg "Cleaning up." @@ -290,7 +306,11 @@ generate_ca() importbrowsers() { - if ! which certutil > /dev/null + # Don't check with -H, -H defies any method to not + # print the output on screen! Let's hope that every + # certutil gets build with some kind of build flags + # which end up being printed here: + if test -z "`certutil --build-flags`" > /dev/null 2>&1 then warningmsg "The 'certutil' command was not found." warningmsg "Not importing into browsers." -- 2.25.1