From: Marcin Krol Date: Thu, 28 Jul 2016 14:12:37 +0000 (+0000) Subject: - script for generating request handler server certificate X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=b82f959f4e375080d36e4bf5a89f461fdd74121e;p=tld-builder.git - script for generating request handler server certificate --- diff --git a/admin/gen-cert.sh b/admin/gen-cert.sh new file mode 100755 index 0000000..6cb96c1 --- /dev/null +++ b/admin/gen-cert.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +umask 077 + +CONFIG=$HOME/.tldbuilderrc +[ -f "$CONFIG" ] && . $CONFIG +[ -n "$BUILDERPATH" ] || BUILDERPATH="$HOME/tld-builder/" +export BUILDERPATH + +if [ -d "$BUILDERPATH" ]; then + cd "$BUILDERPATH" +else + echo "the $BUILDERPATH directory does not exist" + exit 1 +fi + + +if [ -f "$BUILDERPATH/config/global" ]; then + . $BUILDERPATH/config/global +fi + +echo "Generating self-signed certificate for request handler server" + +openssl req -x509 -nodes -days 3650 \ + -newkey rsa:4096 \ + -keyout $BUILDERPATH/config/request-server.key \ + -out $BUILDERPATH/config/request-server.crt \ + <