Skip to content

Commit

Permalink
Integrate '$has_config' into expand_ssl_config() and escape_hazard()
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 Jul 17, 2023
1 parent f352b6f commit 88b3bf9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions easyrsa3/easyrsa
Expand Up @@ -924,9 +924,14 @@ escape_hazard() {
return
elif [ "$working_safe_org_conf" ]; then
# Has run once
verbose "escape_hazard: BYPASSED"
return
elif [ -z "$has_config" ]; then
# SSL Config not required
verbose "escape_hazard: IGNORED"
return
else
# Run once
verbose "escape_hazard: RUN-ONCE"
fi

Expand Down Expand Up @@ -976,9 +981,14 @@ expand_ssl_config() {
return
elif [ "$working_safe_ssl_conf" ]; then
# Has run once
verbose "expand_ssl_config: BYPASSED"
return
elif [ -z "$has_config" ]; then
# SSL Config not required
verbose "expand_ssl_config: IGNORED"
return
else
# Run once
verbose "expand_ssl_config: RUN-ONCE"
fi

Expand Down Expand Up @@ -1059,7 +1069,7 @@ easyrsa_openssl() {
rand)
die "easyrsa_openssl: Illegal SSL command: rand"
;;
makesafeconf) makesafeconf=1 ;;
makesafeconf) makesafeconf=1; has_config=1 ;;
ca|req|srp|ts) has_config=1 ;;
*) unset -v has_config
esac
Expand Down Expand Up @@ -1093,7 +1103,7 @@ easyrsa_openssl() {
verbose "\
easyrsa_openssl: Safe SSL conf OK: $safe_ssl_cnf_tmp"
else
die "\
[ "$has_config" ] && die "\
easyrsa_openssl - Safe SSL conf MISSING: $safe_ssl_cnf_tmp"
fi

Expand Down

0 comments on commit 88b3bf9

Please sign in to comment.