-
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.
write: Allow 'stdout' as a target for 'safe-ssl'
This looks more intrusive than it really is. The problem to solve is creating a openssl-easyrsa.cnf file in the EASYRSA_TEMP_DIR, as a temp-file. 1. Remove write_easyrsa_ssl_cnf_tmp() from secure_session(): This was not the correct place to create the SSL cnf file. 2. make_safe_ssl(): pass parameters to 'easyrsa_openssl makesafeconf' 3. Specify a new variable for the 'safe-ssl' file: $safe_target_file 3.a If $safe_target_file is specified then send output to it. Otherwise, send output to 'stdout' (As all other 'write' commands). 4. Secure a temp-session, only if it has not been done before. 4.a Create openssl-easyrsa.cnf (Temp), only if a secure session was created above. Otherwise, this file has already been created. 5. write_easyrsa_ssl_cnf_tmp: Set OPENSSL_CONF=/dev/null for subshell use of raw SSL execution. 6. Have legacy_files() require_pki=1 and verify_working_env(). Move '$legacy_file_over_write' confirmation to legacy_files() 7. Change 'write safe-ssl' from fixed output to the same as all other 'write' commands: output to 'stdout' or a predetermined file-name in a user specified directory, eg: - 'easyrsa write safe-ssl' or 'easyrsa write safe-ssl pki' 8. Recatagorise 'write' as not requiring a PKI, because we may want to output to 'stdout' without a working PKI. 9. IMPORTANT: This is new for Easy-RSA, correct use of a temp-dir. If a working temp-dir exists then create a temp-session and openssl-easyrsa.cnf (Temp) file. This decouples the default temp-dir from a default PKI. Unrelated change: - Change a 'print' to 'information' in --keep-tmp code. Signed-off-by: Richard T Bonhomme <[email protected]>
- Loading branch information
1 parent
9be2cac
commit 1260519
Showing
1 changed file
with
63 additions
and
33 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