-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce variable heredoc expansion for SSL/Safe Config file
This replaces use of 'sed' to expand the SSL config file for LibreSSL use. Currently, the SSL config file is copied unexpanded from the heredoc to the openssl-easyrsa.cnf file. 'sed' is used to expand the '$ENV::EASYRSA_var' to the configured EasyRSA values. This change replaces use of 'sed' with expanding the 'ssl-cnf' heredoc. The expansion of the heredoc can be configured to expand the original values of, eg: $ENV::EASYRSA_PKI to $EASYRSA_PKI, or be set to expand the values to the originial text of the file. eg: $ENV::EASYRSA_PKI will expand to the same text string: '$ENV::EASYRSA_PKI'. This allows expanding the SSL config heredoc to either: * Unexpanded OpenSSL labels. * Fully expanded safe values, configured by Easy-RSA. The unexpanded output can be varified against the known heredoc hash within the script: 82439f1860838e28f6270d5d06b1771756db777861e19bf9edc21222f86a310d To confirm this hash, use: 'easyrsa write ssl-cnf | openssl dgst' The expanded 'write safe-cnf' has all OpenSSL labels expanded. Signed-off-by: Richard T Bonhomme <[email protected]>
- Loading branch information
1 parent
d51d79b
commit 9c5d423
Showing
1 changed file
with
76 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters