Skip to content

Commit

Permalink
export-p12 Legacy mode: Minor imrovements
Browse files Browse the repository at this point in the history
Require OpenSSL v3 for use.

If used then add an extra error message, to clarify that SSL option
'-legacy' may not be supported by the SSL library in use.

Improve 'help' and Changelog details.

Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Jan 4, 2024
1 parent f8514de commit 1f6c851
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ Easy-RSA 3 ChangeLog
3.2.0 (TBD)

PENDING: Branch-merge: v3.2.0-beta2 (#1055)
* export-p12: New command option 'legacy'
* export-p12: New command option 'legacy'. OpenSSL V3 Only (f8514de)
Fallback to encryption algorithm RC2_CBC or 3DES_CBC
* export-p12: Always set 'friendlyName' to file-name-base (da9e594)
* Update OpenSSL to 3.2.0
* Update OpenSSL to 3.2.0 (03e4829)

Branch-merge: v3.2.0-beta1 (#1046) 2023/12/15 Commit: 7120876

Expand Down
8 changes: 7 additions & 1 deletion easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,8 @@ cmd_help() {
* nokey - Do not include the private key in the PKCS12 output
* nofn - Do not set 'freindlyName'
For more, see: 'easyrsa help friendly'
* legacy - Use legacy mode of operation"
* legacy - Use legacy encryption algorithm RC2_CBC or 3DES_CBC
OpenSSL V3 ONLY: Default algorithm is AES-256-CBC"
;;
friendly)
text_only=1
Expand Down Expand Up @@ -3285,6 +3286,8 @@ Run easyrsa without commands for usage and command help."
unset friendly_name
;;
legacy)
[ "$openssl_v3" ] || \
user_error "Option 'legacy' requires SSL version 3"
legacy=-legacy
;;
*)
Expand Down Expand Up @@ -3401,6 +3404,9 @@ Missing User Certificate, expected at:
p12)
pkcs_out="$EASYRSA_PKI/private/$file_name_base.p12"

[ "$legacy" ] && \
error_info="SSL library may not support -legacy mode"

# export the p12:
easyrsa_openssl pkcs12 -export \
-in "$crt_in" \
Expand Down

0 comments on commit 1f6c851

Please sign in to comment.