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

Make gen_req() Always use EASYRSA_REQ_CN as intended #524

Merged
merged 3 commits into from Apr 5, 2022
Merged

Make gen_req() Always use EASYRSA_REQ_CN as intended #524

merged 3 commits into from Apr 5, 2022

Conversation

TinCanTech
Copy link
Collaborator

All requests now have the specified commonName <FILE_NAME_BASE>

Changes:

  • Separate EASYRSA_BATCH from internal SSL -batch option.
    This makes the code easier to understand.

  • If both EASYRSA_BATCH and openssl_batch are unset then full
    inter-active mode is enabled. The user can verify the input.

    Otherwise SSL interactive is disabled and no user interaction
    is required.

    In either case, all DN fields are fully populated, depending on
    EASYRSA_DN mode ('org' or 'cn_only').

Closes: #456

Signed-off-by: Richard T Bonhomme tincantech@protonmail.com

All requests now have the specified commonName <FILE_NAME_BASE>

Changes:

* Separate EASYRSA_BATCH from internal SSL -batch option.
  This makes the code easier to understand.

* If both EASYRSA_BATCH and openssl_batch are unset then full
  inter-active mode is enabled.  The user can verify the input.

  Otherwise SSL interactive is disabled and no user interaction
  is required.

  In either case, all DN fields are fully populated, depending on
  EASYRSA_DN mode ('org' or 'cn_only').

Closes: #456

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
@TinCanTech TinCanTech self-assigned this Apr 2, 2022
@TinCanTech TinCanTech added Full-Approval Merge is imminent Priority Acknowledged priority BUG-FIX labels Apr 2, 2022
@TinCanTech TinCanTech added this to the v3.0.9 milestone Apr 2, 2022
easyrsa3/easyrsa Outdated
# shellcheck disable=2086,2148

# Set SSL non-interactive mode, otherwise allow full user interaction
if [ "EASYRSA_BATCH" ] || [ "$openssl_batch" ]; then
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"EASYRSA_BATCH" -> "$EASYRSA_BATCH" - $

TinCanTech added a commit that referenced this pull request Apr 3, 2022
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
@TinCanTech
Copy link
Collaborator Author

Merged in testing branch available: https://github.com/OpenVPN/easy-rsa/tree/testing

@TinCanTech TinCanTech added testing branch Major Changes Changes between Major 3.X version numbers - X is Major documentation Full-Approval Merge is imminent and removed feedback welcome initial-approval labels Apr 3, 2022
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
@TinCanTech TinCanTech removed the Major Changes Changes between Major 3.X version numbers - X is Major label Apr 5, 2022
@TinCanTech TinCanTech merged commit 4ec775e into OpenVPN:master Apr 5, 2022
@TinCanTech TinCanTech deleted the fix-gen-req-cn branch April 5, 2022 22:12
@TinCanTech TinCanTech added the Major Changes Changes between Major 3.X version numbers - X is Major label Apr 13, 2022
TinCanTech added a commit to TinCanTech/easy-rsa that referenced this pull request Sep 8, 2022
Due to my previous misunderstanding of the intended use of --req-cn,
it is no longer possible to set commonName for command gen-req.
Ref: OpenVPN#524  OpenVPN#456

This commit restores v30x series behavior:
* --req-cn can only be used in batch mode.
* --req-cn can only be used by commands build-ca and gen-req.
* SSL layer prompts are restored to original behavior.

Important: The use of internal batch mode is no longer required
for command sign_req(), when called by build_full(). This code
has been disabled but remains in place.  This is a considerable
change under the hood but there is no user observable difference.

Also, minor improvements to help and EasyRSA-Advanced.md

Tested manually and thoroughly.

Closes: OpenVPN#668

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG-FIX documentation Full-Approval Merge is imminent Major Changes Changes between Major 3.X version numbers - X is Major Priority Acknowledged priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In gen-req --batch option generates request with "subject=CN = ChangeMe"
1 participant