Skip to content
Snippets Groups Projects

MAINT: linkahead rename

Open Henrik tom Wörden requested to merge f-linkahead-rename into dev
18 files
+ 56
56
Compare changes
  • Side-by-side
  • Inline
Files
18
+ 4
4
@@ -24,18 +24,18 @@
# Creates a directory `cert` and certificates in this directory.
#
# The hostname for which the certificate is created can be changed by setting
# the environment variable CAOSHOSTNAME.
# the environment variable LINKAHEADHOSTNAME.
#
# ## Overview of variables ##
#
# - CAOSHOSTNAME :: Hostname for the key (localhost)
# - LINKAHEADHOSTNAME :: Hostname for the key (localhost)
# - KEYPW :: Password for the key (default ist CaosDBSecret)
# - KEYSTOREPW :: Password for the key store (same as KEYPW)
function cert() {
mkdir -p cert
cd cert
KEYPW="${KEYPW:-CaosDBSecret}"
CAOSHOSTNAME="${CAOSHOSTNAME:-localhost}"
LINKAHEADHOSTNAME="${LINKAHEADHOSTNAME:-localhost}"
KEYSTOREPW="${KEYPW:-}"
# NOTE: KEYPW and KEYSTOREPW are the same, due to Java limitations.
KEYPW="${KEYPW}" openssl genrsa -aes256 -out caosdb.key.pem \
@@ -43,7 +43,7 @@ function cert() {
# Certificate is for localhost
KEYPW="${KEYPW}" openssl req -new -x509 -key caosdb.key.pem \
-out caosdb.cert.pem -passin env:KEYPW \
-subj "/C=/ST=/L=/O=/OU=/CN=${CAOSHOSTNAME}"
-subj "/C=/ST=/L=/O=/OU=/CN=${LINKAHEADHOSTNAME}"
KEYPW="${KEYPW}" KEYSTOREPW="$KEYSTOREPW" openssl pkcs12 -export \
-inkey caosdb.key.pem -in caosdb.cert.pem -out all-certs.pkcs12 \
-passin env:KEYPW -passout env:KEYPW
Loading