RH2023467: Enable FIPS keys export#6
Closed
franferrax wants to merge 8 commits intorh-openjdk:fipsfrom
franferrax:RH2023467
Closed
RH2023467: Enable FIPS keys export#6franferrax wants to merge 8 commits intorh-openjdk:fipsfrom franferrax:RH2023467
franferrax wants to merge 8 commits intorh-openjdk:fipsfrom
franferrax:RH2023467
Conversation
Author
|
I've also made some improvements to the test suite. That improved version also passed, see akashche/fips-whitebox#1. |
RH2094027 - SunEC runtime permission for FIPS
…r services in FIPS mode RH2092507 - P11Key.getEncoded does not work for DH keys in FIPS mode
Backport-Of: rh-openjdk/jdk@bd324bd Co-Authored-By: Martin Balao <mbalao@redhat.com> Co-Authored-By: Alex Kashchenko <akashche@redhat.com>
…s to handle RSA private key in PKCS#1 openjdk/jdk@68cf65d https://bugs.openjdk.org/browse/JDK-8023980
Import PKCS11Exception return values enum, to adapt code for the local backport of openjdk/jdk@7ab6dc8 Remove unused variables forgotten in rh-openjdk/jdk#14 (see rh-openjdk/jdk#21)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Search this PR in Red Hat Jira
ff26db7...0cb2359 (excluding ff26db7)
rh-openjdk:fips← #1 ← #5 ← THIS PRRH2023467: Enable the export of keys in plain from the NSS Software Token while in FIPS mode
A backport of rh-openjdk/jdk#1, which also includes rh-openjdk/jdk#14 (a follow-up issue found in the first PR).
NOTE: I've created the branch starting from #5's 6afe961 (which is a dependency for certain changes).
References
Pull request creation procedure
git cherry-pick --continueand edit commit messages to remove the original PR numbers from therh-openjdk/jdkrepo, and to add references to the back-ported commit hashesConflicts
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11Exception.javaerrorCode-onlyPKCS11Exceptionconstructor added in rh-openjdk/jdk@abcd095, because this constructor hadn't been added in 8e0ea91, since it was still part of upstream 11u code (since 11u doesn't have JDK-6676643: Improve current C_GetAttributeValue native implementation)src/java.base/share/classes/sun/security/rsa/SunRsaSignEntries.java"RSA"algorithm of theKeyFactoryservice in FIPS (implemented insun.security.rsa.RSAKeyFactory$Legacy)"RSASSA-PSS"algorithm of theKeyFactoryservice in FIPS (implemented insun.security.rsa.PSSParameters)Additional required changes
Once conflicts were solved, the following changes were required:
P11Key.java:SharedSecretsimport in 11u has to be ofjdk.internal.misc.SharedSecrets, and notjdk.internal.access.SharedSecretsPKCS11.java: changes from 5c8832f require passing an extranullafter rh-openjdk/jdk@bd324bd is appliedFIPSKeyImporter.java: removetypeandformatparameters ofsun.security.rsa.RSAPrivateCrtKeyImpl.newKey()(added in JDK-8023980: JCE doesn't provide any class to handle RSA private key in PKCS#1)import static sun.security.pkcs11.wrapper.PKCS11Exception.*;to adapt code for introduced openjdk/jdk@7ab6dc8 backport (ff26db7)