From d793e5bae5fff7f40a1338eebd922ed8ba4d18e6 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Thu, 24 Dec 2015 10:01:00 +0100 Subject: [PATCH] Remove obsolete generate_certificate.sh --- generate_certificate.sh | 91 ----------------------------------------- 1 file changed, 91 deletions(-) delete mode 100755 generate_certificate.sh diff --git a/generate_certificate.sh b/generate_certificate.sh deleted file mode 100755 index dd711245d..000000000 --- a/generate_certificate.sh +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/bash - -set -eu -o pipefail - -# C = US -# ST = California -# L = San Francisco -# O = Selfhost -# OU = Cloudron -# CN = *.nebulon.cloudron.com -# emailAddress = cert@selfhost.io - -if [[ $# < 8 ]]; then - echo "Not enough arguments" - exit 1 -fi - -readonly ARG_C=$1 -readonly ARG_ST=$2 -readonly ARG_L=$3 -readonly ARG_O=$4 -readonly ARG_OU=$5 -readonly ARG_CN=$6 -readonly ARG_EMAIL=$7 - -readonly CONFIG_FILE=cert.config -OUT_TAR=cert.tar - -CERT_OUT_DIR=$8 - -echo "" -echo "==================================="; -echo " Generating certifcate:"; -echo " C: $ARG_C"; -echo " ST: $ARG_ST"; -echo " L: $ARG_L"; -echo " O: $ARG_O"; -echo " OU: $ARG_OU"; -echo " CN: $ARG_CN"; -echo " EMAIL: $ARG_EMAIL"; -echo "==================================="; -echo ""; - -# ensure out dir -mkdir -p $CERT_OUT_DIR - -# cd into out dir -cd $CERT_OUT_DIR - -# clean out dir -rm -f host.* -rm -f $CONFIG_FILE - -# generate config file -cat > $CONFIG_FILE < host.key - -openssl req -new -out host.csr -key host.key -config $CONFIG_FILE -openssl x509 -req -days 3650 -in host.csr -signkey host.key -out host.cert -extensions v3_req -extfile $CONFIG_FILE -openssl x509 -noout -fingerprint -text < host.cert > host.info -cat host.cert host.key > host.pem - -echo "Done."