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.

Bug 2004539

Summary: PKCS12 files encrypted using camellia-128-cbc or camellia-192-cbc don't interoperate with openssl
Product: Red Hat Enterprise Linux 9 Reporter: Ivan Nikolchev <inikolch>
Component: nssAssignee: Bob Relyea <rrelyea>
Status: CLOSED ERRATA QA Contact: Ivan Nikolchev <inikolch>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 9.0CC: rrelyea
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 12:47:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ivan Nikolchev 2021-09-15 14:15:51 UTC
Steps to reproduce:

    1.openssl req -x509 -newkey rsa:2048 -keyout localhost.key -out localhost.crt -subj /CN=localhost -nodes -batch -days 365
    2.openssl pkcs12 -export -in localhost.crt -inkey localhost.key -out bundle.p12 -passout pass:Testpassword123 -name server -certpbe camellia-128-cbc -keypbe camellia
    -128-cbc
    3.pk12util -i bundle.p12 -d nssdb -W Testpassword123

Actual results:

pk12util: PKCS12 decode not verified: SEC_ERROR_BAD_PASSWORD: The security password entered is incorrect.
pk12util: PKCS12 decode validate bags failed: SEC_ERROR_INVALID_ARGS: security library: invalid arguments.

This only happens with camellia 128 and 192. Camellia-256 works correctly.

When we try the other way around, file exported by NSS and try to import it with openssl, you get this error:

[inikolcev@localhost test]$ openssl pkcs12 -in nss-bundle.p12
Enter Import Password:
Bag Attributes
friendlyName: server
localKeyID: 85 98 66 1A 57 74 44 05 5C 51 29 0E 7D AA C2 C6 94 F9 73 82
Error outputting keys and certificates
140395417737024:error:060A407B:digital envelope routines:PKCS5_v2_PBKDF2_keyivgen:unsupported keylength:crypto/evp/p5_crpt2.c:165:
140395417737024:error:06074078:digital envelope routines:EVP_PBE_CipherInit:keygen failure:crypto/evp/evp_pbe.c:131:
140395417737024:error:23077073:PKCS12 routines:PKCS12_pbe_crypt:pkcs12 algor cipherinit error:crypto/pkcs12/p12_decr.c:40:
140395417737024:error:2306A075:PKCS12 routines:PKCS12_item_decrypt_d2i:pkcs12 pbe crypt error:crypto/pkcs12/p12_decr.c:93:

Expected results:

PKCS12 file is imported successfully.

Comment 6 errata-xmlrpc 2022-05-17 12:47:48 UTC
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 (new packages: nss), 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/RHEA-2022:2398