mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 18:19:33 +00:00
Replace openssl certificate / CRL generation with the tool as used by Let's Encrypt, storing the keys on SoftHSMv2, a simulated HSM (Hardware Security Module). Include migration of old setups where key files were also stored on disk.
26 lines
580 B
Bash
Executable File
26 lines
580 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
baseDir=$(cd $(dirname $0) && pwd)
|
|
dataDir="/opt/boulder/labca/certs/webpki"
|
|
|
|
export PKI_ROOT_CERT_BASE="$dataDir/root-01-cert"
|
|
export PKI_INT_CERT_BASE="$dataDir/issuer-01-cert"
|
|
|
|
cd /opt/boulder/labca
|
|
$baseDir/apply-boulder
|
|
|
|
cd /opt/wwwstatic
|
|
|
|
PKI_ROOT_CRL_FILE=${PKI_ROOT_CERT_BASE/-cert/-crl}.pem
|
|
if [ -e "$PKI_ROOT_CRL_FILE" ]; then
|
|
cp $PKI_ROOT_CRL_FILE crl/
|
|
else
|
|
echo "WARNING: no Root CRL file present - please upload one from the manage page"
|
|
fi
|
|
cp $PKI_ROOT_CERT_BASE.pem certs/
|
|
cp $PKI_INT_CERT_BASE.pem certs/
|
|
|
|
$baseDir/apply-nginx
|