libressl: introduce function make_ssl_config
This function reads openssl-easyrsa.cnf and then removes "ENV::" and replaces "$vars" with value then writes the results to safessl-easyrsa.cnf
This commit is contained in:
parent
000b47712a
commit
b647256313
@ -287,6 +287,28 @@ clean_temp() {
|
|||||||
done
|
done
|
||||||
} # => clean_temp()
|
} # => clean_temp()
|
||||||
|
|
||||||
|
# Make LibreSSL safe config file from OpenSSL config file
|
||||||
|
make_ssl_config() {
|
||||||
|
sed -e "s,ENV::,,g" \
|
||||||
|
-e "s,\$dir,$EASYRSA_PKI,g" \
|
||||||
|
-e "s,\$EASYRSA_PKI,$EASYRSA_PKI,g" \
|
||||||
|
-e "s,\$EASYRSA_CERT_EXPIRE,$EASYRSA_CERT_EXPIRE,g" \
|
||||||
|
-e "s,\$EASYRSA_CRL_DAYS,$EASYRSA_CRL_DAYS,g" \
|
||||||
|
-e "s,\$EASYRSA_DIGEST,$EASYRSA_DIGEST,g" \
|
||||||
|
-e "s,\$EASYRSA_KEY_SIZE,$EASYRSA_KEY_SIZE,g" \
|
||||||
|
-e "s,\$EASYRSA_DIGEST,$EASYRSA_DIGEST,g" \
|
||||||
|
-e "s,\$EASYRSA_DN,$EASYRSA_DN,g" \
|
||||||
|
-e "s,\$EASYRSA_REQ_COUNTRY,$EASYRSA_REQ_COUNTRY,g" \
|
||||||
|
-e "s,\$EASYRSA_REQ_PROVINCE,$EASYRSA_REQ_PROVINCE,g" \
|
||||||
|
-e "s,\$EASYRSA_REQ_CITY,$EASYRSA_REQ_CITY,g" \
|
||||||
|
-e "s,\$EASYRSA_REQ_ORG,$EASYRSA_REQ_ORG,g" \
|
||||||
|
-e "s,\$EASYRSA_REQ_OU,$EASYRSA_REQ_OU,g" \
|
||||||
|
-e "s,\$EASYRSA_REQ_CN,$EASYRSA_REQ_CN,g" \
|
||||||
|
-e "s,\$EASYRSA_REQ_EMAIL,$EASYRSA_REQ_EMAIL,g" \
|
||||||
|
"$EASYRSA_SSL_CONF" > "$EASYRSA_SAFE_CONF" || die "\
|
||||||
|
Failed to update $EASYRSA_SAFE_CONF"
|
||||||
|
} # => make_ssl_config()
|
||||||
|
|
||||||
vars_source_check() {
|
vars_source_check() {
|
||||||
# Check for defined EASYRSA_PKI
|
# Check for defined EASYRSA_PKI
|
||||||
[ -n "$EASYRSA_PKI" ] || die "\
|
[ -n "$EASYRSA_PKI" ] || die "\
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user