Skip to content

Commit

Permalink
Move verify_ssl_lib() - Always verify SSL lib, for all commands
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
  • Loading branch information
TinCanTech committed Feb 8, 2023
1 parent ab26413 commit 8de04a1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,9 @@ verify_ssl_lib() {
*)
error_msg="$("$EASYRSA_OPENSSL" version 2>&1)"
die "\
* OpenSSL must either exist in your PATH
or be defined in your vars file.

Invalid SSL output for 'version':

$error_msg"
Expand Down Expand Up @@ -4655,15 +4658,15 @@ Sourcing the vars file and building certificates will probably fail ..'

set_var EASYRSA_KDC_REALM "CHANGEME.EXAMPLE.COM"

# Verify SSL Lib - One time ONLY
verify_ssl_lib

# Find x509-types but do not fail - Not fatal here, used by 'help'
install_data_to_pki x509-types-only

# For commands which 'require a PKI' and the PKI exists
if [ "$pki_is_required" ] && [ -d "$EASYRSA_PKI" ]; then

# Verify SSL Lib - One time ONLY
verify_ssl_lib

# mkdir Temp dir session
secure_session || die "Temporary directory secure-session failed."

Expand Down Expand Up @@ -5329,7 +5332,7 @@ print_version()
EasyRSA Version Information
Version: $EASYRSA_version
Generated: ~DATE~
SSL Lib: $ssl_version
SSL Lib: ${ssl_version:-undefined}
Git Commit: ~GITHEAD~
Source Repo: https://github.com/OpenVPN/easy-rsa
VERSION_TEXT
Expand Down

0 comments on commit 8de04a1

Please sign in to comment.