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 1491444 - PKCS#12 files from older NSS releases do not work with current NSS versions
Summary: PKCS#12 files from older NSS releases do not work with current NSS versions
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nss
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Daiki Ueno
QA Contact: Alicja Kario
URL:
Whiteboard:
Depends On:
Blocks: rhel7-nss-pkcs12 1493911 1494631
TreeView+ depends on / blocked
 
Reported: 2017-09-13 20:14 UTC by Nathan Kinder
Modified: 2018-04-10 09:46 UTC (History)
6 users (show)

Fixed In Version: nss-3.34.0-0.1.beta1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1493911 (view as bug list)
Environment:
Last Closed: 2018-04-10 09:44:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 1399867 0 -- RESOLVED pk12util: add backward compatibility with old NSS produced files 2020-03-05 12:44:48 UTC
Red Hat Product Errata RHEA-2018:0679 0 None None None 2018-04-10 09:46:03 UTC

Description Nathan Kinder 2017-09-13 20:14:27 UTC
Produce a PKCS #12 file using (for example) AES-256-CBC (PBES2) in
RHEL 7.3 (nss-3.21.0-17.el7).

Then try to import it using pk12util on RHEL 7.4 (nss-3.28.4-8.el7).
It will fail.  This is a compatibility problem.  This breaks (at
least) FreeIPA and Dogtag KRA replica creation on RHEL 7.4 from a
RHEL 7.3 master (likewise Fedora).  Key backups created on the
earlier version cannot be restored on the newer versions.  And so
on.

nss-3.28.4-2.el7 seems to be the RHEL package version that first has
this problem.

There has been some investigation on this issue, and the following potential patch has been shown to resolve the issue:

  https://github.com/ueno/nss/commit/4c55304e80126659e08dc5fb7ef244162514fba9

Comment 8 Alicja Kario 2017-09-14 14:44:58 UTC
The problem is a bit bigger - NSS 3.21.0 will create PKCS#12 files that cannot be processed by OpenSSL-1.1.1-dev in many cases.

When key (-c option to pk12util) is encrypted with following mechanisms:
RC2-CBC
DES-EDE3-CBC
PKCS #12 V2 PBE With SHA-1 And 128 Bit RC4
PKCS #12 V2 PBE With SHA-1 And 40 Bit RC4
PKCS #12 V2 PBE With SHA-1 And 3KEY Triple DES-CBC
PKCS #12 V2 PBE With SHA-1 And 128 Bit RC2 CBC
PKCS #12 V2 PBE With SHA-1 And 40 Bit RC2 CBC

it is decryptable with OpenSSL

When it is encrypted with following mechanisms:
DES-ECB
DES-CBC
PKCS #5 Password Based Encryption with MD2 and DES-CBC
PKCS #5 Password Based Encryption with MD5 and DES-CBC
PKCS #5 Password Based Encryption with SHA-1 and DES-CBC
AES-128-ECB
AES-128-CBC
AES-192-ECB
AES-192-CBC
AES-256-ECB
AES-256-CBC
CAMELLIA-128-CBC
CAMELLIA-192-CBC
CAMELLIA-256-CBC
SEED-CBC

it is not decryptable with OpenSSL.

With nss-3.32.0-1.1.fc25, the following are decryptable by OpenSSL:
RC2-CBC
DES-EDE3-CBC
PKCS #12 V2 PBE With SHA-1 And 128 Bit RC4
PKCS #12 V2 PBE With SHA-1 And 40 Bit RC4
PKCS #12 V2 PBE With SHA-1 And 3KEY Triple DES-CBC
PKCS #12 V2 PBE With SHA-1 And 128 Bit RC2 CBC
PKCS #12 V2 PBE With SHA-1 And 40 Bit RC2 CBC
AES-128-CBC
AES-192-CBC
AES-256-CBC
CAMELLIA-256-CBC
SEED-CBC

While following are not:
DES-ECB
DES-CBC
PKCS #5 Password Based Encryption with MD2 and DES-CBC
PKCS #5 Password Based Encryption with MD5 and DES-CBC
PKCS #5 Password Based Encryption with SHA-1 and DES-CBC
AES-128-ECB
AES-192-ECB
AES-256-ECB
CAMELLIA-128-CBC
CAMELLIA-192-CBC

For certificates (-C) encryption both versions create undecryptable files with following ciphers:
DES-CBC
PKCS #5 Password Based Encryption with MD2 and DES-CBC
PKCS #5 Password Based Encryption with MD5 and DES-CBC
PKCS #5 Password Based Encryption with SHA-1 and DES-CBC

Comment 9 Daiki Ueno 2017-09-14 15:04:12 UTC
(In reply to Hubert Kario from comment #8)
> The problem is a bit bigger - NSS 3.21.0 will create PKCS#12 files that
> cannot be processed by OpenSSL-1.1.1-dev in many cases.

Unless it is also the case with NSS (i.e. such files created with NSS 3.21 can be read by NSS 3.21, but not with NSS 3.28 any more), could you file a separate bug with a lower priority, please?

Comment 12 Alicja Kario 2017-10-03 16:29:43 UTC
man page fix postponed to RHEL 7.5: bug 1498182

Comment 17 errata-xmlrpc 2018-04-10 09:44:43 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, 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-2018:0679


Note You need to log in before you can comment on or make changes to this bug.