Skip to content

Commit e41cd9c

Browse files
authored
Remove forgotten dead code from openjdk#13 and openjdk#14 (openjdk#21)
openjdk#13 isn't a perfect revert of 0af22dc limited to SSLContextImpl.java and SunJSSE.java, since it doesn't remove the SharedSecrets import. This was already in this way in rh2020290-support_tls_1_3_in_fips.v1.patch, I'm now realizing this when doing the OpenJDK 11 backport and retrying the same approach in OpenJDK 17: ~~~ # Revert openjdk#13 git show 0bd5ca9 | git apply -R # Redo openjdk#13 by reverting 0af22dc in SSLContextImpl.java and SunJSSE.java git show 0af22dc | git apply -R --include=src/java.base/share/classes/sun/security/ssl/* ~~~ In openjdk#14, I forgot to delete the DHKF and DHKFLock static variables from FIPSKeyImporter, which are no longer used, see rh-openjdk#14 (comment). Reviewed-by: @gnu-andrew
1 parent 40cac13 commit e41cd9c

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import java.util.*;
3333
import java.util.concurrent.locks.ReentrantLock;
3434
import javax.net.ssl.*;
35-
import jdk.internal.access.SharedSecrets;
3635
import sun.security.action.GetPropertyAction;
3736
import sun.security.provider.certpath.AlgorithmChecker;
3837
import sun.security.validator.Validator;

src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/FIPSKeyImporter.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ final class FIPSKeyImporter {
7272
private static volatile Provider sunECProvider = null;
7373
private static final ReentrantLock sunECProviderLock = new ReentrantLock();
7474

75-
private static volatile KeyFactory DHKF = null;
76-
private static final ReentrantLock DHKFLock = new ReentrantLock();
77-
7875
static Long importKey(SunPKCS11 sunPKCS11, long hSession, CK_ATTRIBUTE[] attributes)
7976
throws PKCS11Exception {
8077
long keyID = -1;
@@ -319,8 +316,7 @@ private static void exportPrivateKey(
319316
CKA_PRIVATE_EXPONENT, CKA_PRIME_1, CKA_PRIME_2,
320317
CKA_EXPONENT_1, CKA_EXPONENT_2, CKA_COEFFICIENT);
321318
RSAPrivateKey rsaPKey = RSAPrivateCrtKeyImpl.newKey(
322-
RSAUtil.KeyType.RSA, "PKCS#8", plainExportedKey
323-
);
319+
RSAUtil.KeyType.RSA, "PKCS#8", plainExportedKey);
324320
CK_ATTRIBUTE attr;
325321
if ((attr = sensitiveAttrs.get(CKA_PRIVATE_EXPONENT)) != null) {
326322
attr.pValue = rsaPKey.getPrivateExponent().toByteArray();

0 commit comments

Comments
 (0)