diff options
author | ng0 <ng0@n0.is> | 2019-03-15 11:03:12 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-03-15 11:03:12 +0000 |
commit | a8239e3ab2a98fd6ddbf4e43b18dafa894fe641f (patch) | |
tree | 46c6c7105f28ad9eee8ffcc6b93fd32b70e17f4e /src | |
parent | acd597ff0b276b2292cb039b4c8d94afab216427 (diff) | |
download | gnunet-a8239e3ab2a98fd6ddbf4e43b18dafa894fe641f.tar.gz gnunet-a8239e3ab2a98fd6ddbf4e43b18dafa894fe641f.zip |
gnunet-gns-proxy-setup-ca: replace which(1) usage.
Diffstat (limited to 'src')
-rw-r--r-- | src/gns/gnunet-gns-proxy-setup-ca.in | 24 |
1 files 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() | |||
252 | # GNSCANO=`mktemp ${00##*/}.pem` || exit 1 | 252 | # GNSCANO=`mktemp ${00##*/}.pem` || exit 1 |
253 | # fi | 253 | # fi |
254 | 254 | ||
255 | # # ------------- gnutls | ||
256 | # | ||
257 | # if ! which certutil > /dev/null | ||
258 | # then | ||
259 | # warningmsg "The 'certutil' command was not found." | ||
260 | # warningmsg "Not importing into browsers." | ||
261 | # warningmsg "For 'certutil' install nss." | ||
262 | # else | ||
263 | # # Generate CA key | ||
264 | # # pkcs#8 password-protects key | ||
265 | # certtool --pkcs8 --generate-privkey --sec-param high --outfile ca-key.pem | ||
266 | # # self-sign the CA to create public certificate | ||
267 | # certtool --generate-self-signed --load-privkey ca-key.pem --template ca.cfg --outfile ca.pem | ||
268 | |||
269 | # ------------- openssl | ||
270 | |||
255 | OPENSSLCFG=@pkgdatadir@/openssl.cnf | 271 | OPENSSLCFG=@pkgdatadir@/openssl.cnf |
256 | if ! which openssl > /dev/null | 272 | if test -z "`openssl version`" > /dev/null |
257 | then | 273 | then |
258 | warningmsg "'openssl' command not found. Please install it." | 274 | warningmsg "'openssl' command not found. Please install it." |
259 | infomsg "Cleaning up." | 275 | infomsg "Cleaning up." |
@@ -290,7 +306,11 @@ generate_ca() | |||
290 | 306 | ||
291 | importbrowsers() | 307 | importbrowsers() |
292 | { | 308 | { |
293 | if ! which certutil > /dev/null | 309 | # Don't check with -H, -H defies any method to not |
310 | # print the output on screen! Let's hope that every | ||
311 | # certutil gets build with some kind of build flags | ||
312 | # which end up being printed here: | ||
313 | if test -z "`certutil --build-flags`" > /dev/null 2>&1 | ||
294 | then | 314 | then |
295 | warningmsg "The 'certutil' command was not found." | 315 | warningmsg "The 'certutil' command was not found." |
296 | warningmsg "Not importing into browsers." | 316 | warningmsg "Not importing into browsers." |