Skip to content

Commit e19a10c

Browse files
author
James Park-Watt
committed
Move config to config.vanilla to prevent overwrites
Added comment to extensions and opnenssl config to advise the user not to change the files
1 parent 20ff78b commit e19a10c

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

ca/opt/ca/etc/config renamed to ca/opt/ca/etc/config.vanilla

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#set -x
22
#set -e
33

4-
export CONFIGMODIFIED="false"
54
export PKCS11ENGINE="/usr/lib64/engines-1.1/pkcs11.so"
65
#export PKCS11MODULE="/usr/lib64/pkcs11/opensc-pkcs11.so"
76
export PKCS11MODULE="/usr/safenet/lunaclient/lib/libCryptoki2_64.so"
@@ -18,21 +17,22 @@ export CAEXTENSIONS="${CAEXTENSIONS:-intermediate}"
1817
export CADOMAINSUFFIX="example.com"
1918
export CACRLDP1="http://crl1.${CADOMAINSUFFIX}"
2019
export CACRLDP2="http://crl2.${CADOMAINSUFFIX}"
20+
export CONFIGMODIFIED="false"
2121

22-
## Don't edit below
22+
## You shouldn't edit below
2323
export CANAMESAFE=$(echo ${CANAME} | sed 's/\ /+/g')
24-
export CADIR=/opt/ca
25-
export CACONFIGDIR=${CADIR}/etc
26-
export OPENSSL_CONF=${CACONFIGDIR}/openssl.cnf
27-
export OPENSSL_EXTENSIONS_CONF=${CACONFIGDIR}/extensions.cnf
28-
export CALIBDIR=${CADIR}/lib
29-
export CALOCK=${CALIBDIR}/calock
30-
export CASERIAL=${CALIBDIR}/serial
31-
export CACRLSERIAL=${CALIBDIR}/crlserial
32-
export CADATABASE=${CALIBDIR}/database
33-
export CACERTPEM=${CALIBDIR}/${CANAMESAFE}.pem
34-
export CACERTDER=${CALIBDIR}/${CANAMESAFE}.der
35-
export CASIGNEDCERTS=${CALIBDIR}/signed
24+
export CADIR="/opt/ca"
25+
export CACONFIGDIR="${CADIR}/etc"
26+
export OPENSSL_CONF="${CACONFIGDIR}/openssl.cnf"
27+
export OPENSSL_EXTENSIONS_CONF="${CACONFIGDIR}/extensions.cnf"
28+
export CALIBDIR="${CADIR}/lib"
29+
export CALOCK="${CALIBDIR}/calock"
30+
export CASERIAL="${CALIBDIR}/serial"
31+
export CACRLSERIAL="${CALIBDIR}/crlserial"
32+
export CADATABASE="${CALIBDIR}/database"
33+
export CACERTPEM="${CALIBDIR}/${CANAMESAFE}.pem"
34+
export CACERTDER="${CALIBDIR}/${CANAMESAFE}.der"
35+
export CASIGNEDCERTS="${CALIBDIR}/signed"
3636
export PKCS11URI="pkcs11:token=${TOKENLABEL};object=${CAKEYNAME};type=private"
3737

3838
if [ "${CONFIGMODIFIED}" == "false" ]

ca/opt/ca/etc/extensions.cnf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# You should not change this file. If you do, be sure to back it up
2+
# Updating the package will overwrite it.
3+
14
[intermediate]
25
subjectKeyIdentifier = hash
36
authorityKeyIdentifier = keyid:always

ca/opt/ca/etc/openssl.cnf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# You should not change this file. If you do, be sure to back it up
2+
# Updating the package will overwrite it.
3+
14
openssl_conf = openssl_init
25
dir = ${ENV::CADIR}
36
caname = ${ENV::CANAME}

0 commit comments

Comments
 (0)