-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
build-ca: Replace password temp-file method with file-descriptors #955
Conversation
Until now, EasyRSA has used temp-files to store the CA password and passed those temp-files to SSL to build a CA keypair, when building a CA manually, with a password. From now, EasyRSA will use an internal variable to contain the CA password and pass the value of that variable via file-descriptors to SSL, when building a CA keypair. This file-descriptor method is only used when building a CA with a password manually, when the user enters the password via keyboard. All other build-ca methods remain unchanged. Also, move keypair temp-files to output files or error out. Also, minor improvements to comments and verbose messages. Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
The unit-test does not test this code, so I have manually tested it on Linux and Windows.. and LibreSSL.. |
Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
I cannot help thinking that this method needs to allow fallback to temp-files, even though it has passed all tests. Perhaps, this would be better as an option, such as:
Otherwise, it is an extreme change. |
This allows a fallback to use temp-files for CA password, in the event that file-descriptor method fails. Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
good thoughts on the extreme change -- using the default powershell of windows terminal to run the bat EasyRSA Shell ./easyrsa build-ca
Enter New CA Key Passphrase: Enter New CA Key Passphrase: Enter New CA Key Passphrase: Confirm New CA Key Passphrase: Easy-RSA error: easyrsa_openssl - Command has failed:
EasyRSA Version Information EasyRSA Shell ./easyrsa --ca-via-tf build-ca
Enter New CA Key Passphrase: Enter New CA Key Passphrase: Confirm New CA Key Passphrase: NoticeCA creation complete. Your new CA certificate is at:
|
may want to make some documentation somewhere of the --ca-via-tf workaround other than searching past issues and finding this discussion |
@Wolf1098 Thanks for testing and reporting this. The
|
Until now, EasyRSA has used temp-files to store the CA password and passed those temp-files to SSL to build a CA keypair, when building a CA manually, with a password.
From now, EasyRSA will use an internal variable to contain the CA password and pass the value of that variable via file-descriptors to SSL, when building a CA keypair.
This file-descriptor method is only used when building a CA with a password manually, when the user enters the password via keyboard. All other build-ca methods remain unchanged.
Also, move keypair temp-files to output files or error out.
Also, minor improvements to comments and verbose messages.
Original-concept: #950