mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8217835: Remove the experimental SunJSSE FIPS compliant mode
Reviewed-by: mullan
This commit is contained in:
parent
5d0ff15a58
commit
fca0af0487
46 changed files with 364 additions and 2350 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -61,12 +61,6 @@ abstract class KeyManagerFactoryImpl extends KeyManagerFactorySpi {
|
|||
protected void engineInit(KeyStore ks, char[] password) throws
|
||||
KeyStoreException, NoSuchAlgorithmException,
|
||||
UnrecoverableKeyException {
|
||||
if ((ks != null) && SunJSSE.isFIPS()) {
|
||||
if (ks.getProvider() != SunJSSE.cryptoProvider) {
|
||||
throw new KeyStoreException("FIPS mode: KeyStore must be "
|
||||
+ "from provider " + SunJSSE.cryptoProvider.getName());
|
||||
}
|
||||
}
|
||||
keyManager = new SunX509KeyManagerImpl(ks, password);
|
||||
isInitialized = true;
|
||||
}
|
||||
|
@ -91,12 +85,6 @@ abstract class KeyManagerFactoryImpl extends KeyManagerFactorySpi {
|
|||
keyManager = new X509KeyManagerImpl(
|
||||
Collections.<Builder>emptyList());
|
||||
} else {
|
||||
if (SunJSSE.isFIPS() &&
|
||||
(ks.getProvider() != SunJSSE.cryptoProvider)) {
|
||||
throw new KeyStoreException(
|
||||
"FIPS mode: KeyStore must be " +
|
||||
"from provider " + SunJSSE.cryptoProvider.getName());
|
||||
}
|
||||
try {
|
||||
Builder builder = Builder.newInstance(ks,
|
||||
new PasswordProtection(password));
|
||||
|
@ -115,10 +103,7 @@ abstract class KeyManagerFactoryImpl extends KeyManagerFactorySpi {
|
|||
throw new InvalidAlgorithmParameterException(
|
||||
"Parameters must be instance of KeyStoreBuilderParameters");
|
||||
}
|
||||
if (SunJSSE.isFIPS()) {
|
||||
throw new InvalidAlgorithmParameterException
|
||||
("FIPS mode: KeyStoreBuilderParameters not supported");
|
||||
}
|
||||
|
||||
List<Builder> builders =
|
||||
((KeyStoreBuilderParameters)params).getParameters();
|
||||
keyManager = new X509KeyManagerImpl(builders);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue