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 2104724

Summary: Avoid import/export of DH private keys [rhel-8, openjdk-17]
Product: Red Hat Enterprise Linux 8 Reporter: Francisco Ferrari Bihurriet <fferrari>
Component: java-17-openjdkAssignee: Francisco Ferrari Bihurriet <fferrari>
Status: CLOSED ERRATA QA Contact: OpenJDK QA <java-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.7CC: ahughes, jandrlik, pmikova
Target Milestone: rcKeywords: Triaged, ZStream
Target Release: ---Flags: fferrari: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: java-17-openjdk-17.0.4.1.1-3.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2123564 2123565 (view as bug list) Environment:
Last Closed: 2022-11-08 09:32:03 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:
Bug Depends On:    
Bug Blocks: 2123564, 2123565    

Description Francisco Ferrari Bihurriet 2022-07-07 03:19:41 UTC
As analyzed in OPENJDK-824 [1], NSS doesn't support wrapping/unwrapping of Diffie-Hellman private keys (CKK_DH), so we can't import/export them from the NSS PKCS#11 software token.

In addition, as part of Bug 2023467 work, we started to blindly consider a private key extractable when the plain key support is enabled [2], preventing DH private keys from being instantiated as the opaque P11PrivateKey. This now causes an error, as an attempt is made to extract these keys when instantiating the P11DHPrivateKey full-data object.

This work:
 1. Avoids the import/export of DH private keys, going back to the opaque P11PrivateKey for them (instead of P11DHPrivateKey)
 2. Removes the useless code from the FIPS key importer (Bug 1994682), which hasn't triggered any issue, but it will never work
   • NOTE: the FIPS key exporter doesn't have code to handle CKK_DH private keys.

[1] https://issues.redhat.com/browse/OPENJDK-824?focusedCommentId=20495041&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-20495041
[2] https://github.com/rh-openjdk/jdk/commit/bd324bda437a924e58730cc67c133275e8203780#diff-8f7a3a78c41a81cc7d6198037c7cdaf5fc42d3536921d3751d8bbb681265dbe8R387-R388

Comment 13 errata-xmlrpc 2022-11-08 09:32:03 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 (java-17-openjdk bug fix and enhancement update), 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/RHBA-2022:6691