-
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
CA Private Key will be encrypted with des-ede3-cbc during build-ca with OpenSSL 3.x #1122
Comments
@lysiszegerman Thanks for reporting this, I confirm this bug as outlined above. |
The reason that the OpenSSL version makes a difference is that, OpenSSL |
Re-opening for |
Closed via 73d8416 |
@lysiszegerman |
Perfect, thanks a lot for the quick fix, looks good now on both macos and Debian stable for me. |
I noticed some weirdness with the encryption of the CA private key, it always came out encrypted with des-ede3-cbc, no matter which settings I used, and was hunting it down, here's what I found out so far.
Steps to reproduce:
Checkout easy-rsa, switched to branch v3.1.8 (to make sure to get the latest version, I've seen this behaviour with 3.1.0-1 shipped with Debian bookworm and 3.1.7 coming with Homebrew on Mac)
Create empty directory, i.e. no special settings, all defaut
easyrsa init-pki
easyrsa build-ca
Verify encryption of the private key:
OpenSSL version on Debian bookworm: OpenSSL 3.0.11 19 Sep 2023 (Library: OpenSSL 3.0.11 19 Sep 2023)
OpenSSL version on Mac: OpenSSL 3.2.1 30 Jan 2024 (Library: OpenSSL 3.2.1 30 Jan 2024)
This doesn't happen on Debian old-stable.
OpenSSL version on Debian old-stable: OpenSSL 1.1.1w 11 Sep 2023
By executing the two openssl commands from the build_ca function by hand I could reproduce this behaviour. First
openssl genpkey
is called creating$out_key_tmp
. This key is correctly encrypted with aes-256-cbc (checked with openssl asn1parse as above). Thenopenssl req -new
is called with-key $out_key_temp -keyout $out_key_temp
. This overwrites the previously generated private key and encrypts it with des-ede3-cbc.There also doesn't seem to be an option to specify the encyption of the -keyout, so we cannot force the encryption to be aes256. However, it might be possible just to leave out the
-keyout
parameter, since we already generated the key and just overwriting it doesn't change it anyways. Callingopenssl req
by hand without the-keyout
parameter works, I don't know if this would have any other side effects in easyrsa though.The text was updated successfully, but these errors were encountered: