Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: make-vars - Print vars.example (here-doc) to stdout #1024

Merged
merged 3 commits into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Easy-RSA 3 ChangeLog

3.2.0 (TBD)
* New command: make-vars - Print vars.example (here-doc) to stdout (#1024)
* show-expire: Calculate cert. expire seconds from DB date (#1023)
* Forbid "default vars in the default PKI" for all commands (#1021)
There can be only one default vars file, that is now './vars' ONLY.
Expand Down
12 changes: 12 additions & 0 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,9 @@ cmd_help() {
# Test features
text_only=1
text="
Print vars.example here-doc to stdout:
make-vars

Make safessl-easyrsa.cnf file:
mss|make-safe-ssl

Expand Down Expand Up @@ -5827,6 +5830,7 @@ Remove 'unset' ('force_set_var' may also work)."
# shellcheck disable=SC2034 # appears unused
EASYRSA_CALLER=1
easyrsa_path="$PATH"
# shellcheck disable=SC2123 # PATH is the shell ..
PATH=./

# Test sourcing 'vars' in a subshell
Expand Down Expand Up @@ -7304,6 +7308,14 @@ case "$cmd" in
esac
esac

# Run these commands with NO setup
case "$cmd" in
make-vars)
create_vars_example
cleanup ok
;;
esac

# Intelligent env-var detection and auto-loading:
vars_setup

Expand Down