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

[RFE] include EASYRSA_EXT_DIR in 'DIRECTORY STATUS' output #654

Closed
dekeonus opened this issue Aug 23, 2022 · 11 comments · Fixed by #655, #662, #665 or #666
Closed

[RFE] include EASYRSA_EXT_DIR in 'DIRECTORY STATUS' output #654

dekeonus opened this issue Aug 23, 2022 · 11 comments · Fixed by #655, #662, #665 or #666

Comments

@dekeonus
Copy link

currently easyrsa outputs a DIRECTORY STATUS indicating what directories it considers EASYRSA and PKI to be, it would be beneficial to also know what directory easyrsa was sourcing the x509-types from.

@TinCanTech TinCanTech self-assigned this Aug 23, 2022
@TinCanTech
Copy link
Collaborator

TinCanTech commented Aug 23, 2022

Yes, I can see how that would help, thanks!

@TinCanTech
Copy link
Collaborator

TinCanTech commented Aug 23, 2022

FTR, copying x509-types to the PKI, always sets EASYRSA_EXT_DIR to the copy within the PKI, unless it is set externally.

@dekeonus
Copy link
Author

Yes I am aware, and was intending to use that feature with a pre-prepared x509-types folder.
I forgot to copy the folder in and my test certs did not look as expected, then I realised my error.

@TinCanTech
Copy link
Collaborator

#655 adds a message to display the location of x509-types.

@TinCanTech
Copy link
Collaborator

Re-opening for testing and feedback.

@TinCanTech TinCanTech reopened this Aug 24, 2022
@dekeonus
Copy link
Author

dekeonus commented Aug 25, 2022

mmm, not quite what I wanted: I wanted the x509-types dir to be indicated in the easyrsa help output.
Also I'm not sure the clutter of having the vars and x509-types-dir shown on every command is the right choice.

I think both "vars location" and "EASYRSA_EXT_DIR" should be added to the "DIRECTORY STATUS" help output AND that "DIRECTORY STATUS" block added to the --version string (perhaps only if the current $PWD has a pki subdir).

@TinCanTech
Copy link
Collaborator

This is a good idea, I shall look into it. Thanks!

@dekeonus
Copy link
Author

Unfortunately when usage() runs find_x509_types_dir() is called without EASYRSA_PKI set.
This results in easyrsa help always indicating a system location for 'x509-types:'
Thus there is a disconnect between what is displayed from help and what directory will actually be used when performing signing operations.

@TinCanTech
Copy link
Collaborator

TinCanTech commented Aug 28, 2022

@dekeonus Alas .. You are correct.

I have a fix .. Thank you very much for testing. 🍻 🍰

@TinCanTech TinCanTech reopened this Aug 28, 2022
TinCanTech added a commit to TinCanTech/easy-rsa that referenced this issue Aug 28, 2022
Locate existing x509-types directory, after sourcing vars.
If vars is set incorrectly then this WILL over-ride vars.

Closes: OpenVPN#654

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

TinCanTech commented Aug 29, 2022

#665 passed my tests but I may have missed something.

I see the problem.

@TinCanTech TinCanTech reopened this Aug 29, 2022
@TinCanTech
Copy link
Collaborator

Testing welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment