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

Post version 3.1.5 refactor #967

Merged
merged 12 commits into from Jul 2, 2023
Merged

Conversation

TinCanTech
Copy link
Collaborator

Code changes made for general readability and ongoing maintenance.

No functional changes.

build-ca:
* Replace 'print foo' with function create_x509_types_ca()
* Replace 'ignore' with function create_x509_type_COMMON()

sign-req:
* Replace 'ignore' with function create_x509_type_COMMON()

Note: x509-types/COMMON only has comments, no code.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
@TinCanTech TinCanTech self-assigned this Jun 14, 2023
@TinCanTech TinCanTech added the development Possible changes label Jun 14, 2023
@TinCanTech TinCanTech added this to the v3.1.6 milestone Jun 14, 2023
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Only show the "foreign request" warning when sign-req is called for
an imported request. Do not show the warning when the request has
been created by build-full-*.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Remove fucntion-end 'retrun 0' because it masks unexpected errors.

'if; then; else; fi;' wrap SSL call.

Minor improvements.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Replace use of die(), which is very noisy, with user_error(),
which simply outputs the error message and EasyRSA Version.

Use of user_error() is specific to input and file errors,
caused by invalid user input.

Internal errors continue to use die().

Other associated improvements to output.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
@TinCanTech
Copy link
Collaborator Author

Commit f0aa171 closes #968

When commands executed in a subshell fail the error message is lost.

Easy-RSA error log provides a permanent temp-file to write those
error messages to and be displayed on completion of the script.

This first use of the log-file by easyrsa_mktemp(), will log errors
caused by requiring more than three (3) subshell temp-files.

Temp-files created during a subshell command do not update the
temp-file counter, so their name relies on a second, built-in
extension to the temp-file name. If this second extension exceeds
three (3) then a non-fatal warning is logged to the error log-file.

Other functions, which are executed in subshells, will use the error
log-file in follow up patches, as required.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Minor improvements to help and comments

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This moves all PKI and CA initialisation requirements into verify_working_env().

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Prioritise $EASYRSA_NO_VARS above other vars file detection.

Rename $pki_is_required to $require_pki

Re-establish; Do not require PKI, CA or vars for command 'upgrade'.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
@TinCanTech TinCanTech merged commit a8567ba into OpenVPN:master Jul 2, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace use of die for simple errors, with error $msg, to reduce noise
1 participant