summaryrefslogtreecommitdiff
path: root/gensignedcert.sh
diff options
context:
space:
mode:
authorU-Z690-A\user <jrayhawk@omgwallhack.org>2022-06-29 20:26:01 -0700
committerU-Z690-A\user <jrayhawk@omgwallhack.org>2022-06-29 20:26:01 -0700
commit585568aa8b851d153fbec0a46769b8f12e1df7f4 (patch)
treefc4d8daee10acdd48f33de0221a4dd31773f5289 /gensignedcert.sh
parent40e0db376ea51384fc2dbb7feb86d6d83408fe9f (diff)
downloadcash-585568aa8b851d153fbec0a46769b8f12e1df7f4.tar.gz
cash-585568aa8b851d153fbec0a46769b8f12e1df7f4.zip
extendedKeyUsage: decommission ekusub.sh and use environment variables insteadHEADmaster
ekusub.sh has additionally been generalized into inimodify.sh in case I ever need it in the future for anything else.
Diffstat (limited to 'gensignedcert.sh')
-rwxr-xr-xgensignedcert.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/gensignedcert.sh b/gensignedcert.sh
index b51f69b..a5a5368 100755
--- a/gensignedcert.sh
+++ b/gensignedcert.sh
@@ -25,7 +25,8 @@ mkdir -pv "$CA"/signed "$CA"/temp "$CA"/certs
openssl req -config "$OPENSSL_CONFIG" -new -nodes -out "$CA"/temp/"$1".csr -keyout "$CA"/temp/"$1".key
chmod 600 "$CA"/temp/"$1".key
SERIAL=$(cat "$CA"/ca/"$CA".serial)
-openssl ca -config <( ./ekusub.sh "serverAuth" < "$OPENSSL_CONFIG" ) -in "$CA"/temp/"$1".csr
+EKU="serverAuth"
+openssl ca -config "$OPENSSL_CONFIG" -in "$CA"/temp/"$1".csr
if [ -e "$CA"/certs/"$SERIAL".pem ]; then # openssl lacks useful exit status codes, so we check to see if it actually did anything instead.
mv -i "$CA"/temp/"$1".csr "$CA"/temp/"$1".key "$CA"/signed/
ln "$CA"/certs/"$SERIAL".pem "$CA"/signed/"$1".crt # so we can find the certificate by name as well as by serial