8207318: KeyStore#getInstance(File, LoadStoreParameter) does not load the keystore
Reviewed-by: mullan
This commit is contained in:
parent
6caaf8e2f2
commit
da18d08006
@ -1807,6 +1807,7 @@ public class KeyStore {
|
|||||||
keystore.load(dataStream, password);
|
keystore.load(dataStream, password);
|
||||||
} else {
|
} else {
|
||||||
keystore.keyStoreSpi.engineLoad(dataStream, param);
|
keystore.keyStoreSpi.engineLoad(dataStream, param);
|
||||||
|
keystore.initialized = true;
|
||||||
}
|
}
|
||||||
return keystore;
|
return keystore;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 8044445 8194307
|
* @bug 8044445 8194307 8207318
|
||||||
* @summary test new methods from JEP-229: Create PKCS12 Keystores by Default
|
* @summary test new methods from JEP-229: Create PKCS12 Keystores by Default
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -180,7 +180,8 @@ public class ProbeKeystores {
|
|||||||
throw new Exception("ERROR: expected a " + type + " keystore, " +
|
throw new Exception("ERROR: expected a " + type + " keystore, " +
|
||||||
"got a " + ks.getType() + " keystore instead");
|
"got a " + ks.getType() + " keystore instead");
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Probed a " + type + " keystore named '" + file + "'");
|
System.out.println("Probed a " + type + " keystore named '" + file
|
||||||
|
+ "' with " + ks.size() + " entries");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next try with an incorrect password
|
// Next try with an incorrect password
|
||||||
@ -197,7 +198,8 @@ public class ProbeKeystores {
|
|||||||
throw new Exception("ERROR: expected a " + type + " keystore, " +
|
throw new Exception("ERROR: expected a " + type + " keystore, " +
|
||||||
"got a " + ks.getType() + " keystore instead");
|
"got a " + ks.getType() + " keystore instead");
|
||||||
} else {
|
} else {
|
||||||
System.out.println("Probed a " + type + " keystore named '" + file + "'");
|
System.out.println("Probed a " + type + " keystore named '" + file
|
||||||
|
+ "' with " + ks.size() + " entries");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next try with an incorrect password within a LoadStoreParameter
|
// Next try with an incorrect password within a LoadStoreParameter
|
||||||
|
Loading…
Reference in New Issue
Block a user