[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: TRANSPORT: Fix certtool detection. Fixes
From: |
gnunet |
Subject: |
[gnunet] branch master updated: TRANSPORT: Fix certtool detection. Fixes #7257 |
Date: |
Tue, 02 Aug 2022 20:20:06 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new d7dde2880 TRANSPORT: Fix certtool detection. Fixes #7257
d7dde2880 is described below
commit d7dde28801c8478e25c575c0a369284e324d3d24
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Tue Aug 2 20:20:02 2022 +0200
TRANSPORT: Fix certtool detection. Fixes #7257
---
.../gnunet-transport-certificate-creation.in | 26 +++++++++++++---------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/src/transport/gnunet-transport-certificate-creation.in
b/src/transport/gnunet-transport-certificate-creation.in
index 454f05a5d..dfcb4e8e9 100644
--- a/src/transport/gnunet-transport-certificate-creation.in
+++ b/src/transport/gnunet-transport-certificate-creation.in
@@ -42,6 +42,10 @@
progname=${0##*/}
+existence() {
+ command -v "$1" >/dev/null 2>&1
+}
+
setdefaults()
{
verbosity=0
@@ -105,21 +109,23 @@ generate_cert_key()
CERTTOOL=""
GNUTLS_CA_TEMPLATE=@PKGDATADIRECTORY@/gnunet-gns-proxy-ca.template
OPENSSL=0
- if test -z "`gnutls-certtool --version`" > /dev/null
+ if test -x $(existence gnunet-certtool)
+ #if test -z "`gnutls-certtool --version`" > /dev/null
then
- if test -z "`certtool --version`" > /dev/null
+ if test -z "`certtool --version | grep gnutls`" > /dev/null
then
- if test -z "`openssl version`" > /dev/null
+ warningmsg "'gnutls-certtool' or 'certtool' command not found. Trying
openssl."
+ # if test -z "`openssl version`" > /dev/null
+ if test -x $(existence openssl)
then
+ OPENSSL=1
+ else
warningmsg "Install either gnutls certtool or openssl for
certificate generation!"
+ statusmsg "Cleaning up."
exit 1
- else
- OPENSSL=1
fi
- CERTTOOL="openssl"
- else
- CERTTOOL="certtool"
fi
+ CERTTOOL="certtool"
else
CERTTOOL="gnutls-certtool"
fi
@@ -127,8 +133,8 @@ generate_cert_key()
if test 1 -eq $OPENSSL
then
- $CERTTOOL genrsa -out $KEYFILE 1024
- $CERTTOOL req -batch -days 365 -out $CERTFILE -new -x509 -key $KEYFILE
+ openssl genrsa -out $KEYFILE 1024
+ openssl req -batch -days 365 -out $CERTFILE -new -x509 -key $KEYFILE
else
$CERTTOOL --generate-privkey --outfile $KEYFILE 2>/dev/null
$CERTTOOL --template $GNUTLS_CA_TEMPLATE --generate-self-signed
--load-privkey $KEYFILE --outfile $CERTFILE 2>/dev/null
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: TRANSPORT: Fix certtool detection. Fixes #7257,
gnunet <=