Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
OpenSSL PKCS#12 uses certpbe algorithm which is forbidden in FIPS mode (3des?):
# openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:'whatever' -passout pass:'whatever'
139752744220480:error:060740A0:digital envelope routines:EVP_PBE_CipherInit:unknown cipher:crypto/evp/evp_pbe.c:114:
139752744220480:error:23077073:PKCS12 routines:PKCS12_pbe_crypt:pkcs12 algor cipherinit error:crypto/pkcs12/p12_decr.c:41:
139752744220480:error:2306C067:PKCS12 routines:PKCS12_item_i2d_encrypt:encrypt error:crypto/pkcs12/p12_decr.c:144:
139752744220480:error:23073067:PKCS12 routines:PKCS12_pack_p7encdata:encrypt error:crypto/pkcs12/p12_add.c:119:
The command passes when -certpbe is set to NONE.
Version-Release number of selected component (if applicable):
openssl-1.1.1-8.el8
How reproducible:
100%
Steps to Reproduce:
1. Enable FIPS mode.
2. Generate key pair.
3. Export it via openssl pkcs12.
Actual results:
Error (see above).
Expected results:
Successful export.
Additional info:
In FIPS openssl should use FIPS compliant algorithm (analogously to keypbe).
(In reply to Ondrej Moriš from comment #0)
> Additional info:
>
> In FIPS openssl should use FIPS compliant algorithm (analogously to keypbe).
It seems that PBE-SHA1-RC2-40 is used by default actually. Also please notice that both DES-EDE3-CBC and PBE-SHA1-3DES work fine.
Also, I think the default option should be the same when FIPS mode is enabled or disabled (and compliant with FIPS at the same time). It will help to avoid situation when keys are generated with FIPS mode disabled using a non-compliant algorithm and then cannot be used once FIPS mode is enabled.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2019:3700