mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8234744: KeyStore.store can write wrong type of file
Reviewed-by: mullan
This commit is contained in:
parent
50714b0fb9
commit
bc19b64856
2 changed files with 70 additions and 4 deletions
|
@ -217,9 +217,9 @@ public class KeyStoreDelegator extends KeyStoreSpi {
|
|||
try {
|
||||
@SuppressWarnings("deprecation")
|
||||
KeyStoreSpi tmp = primaryKeyStore.newInstance();
|
||||
tmp.engineLoad(bufferedStream, password);
|
||||
keystore = tmp;
|
||||
type = primaryType;
|
||||
keystore.engineLoad(bufferedStream, password);
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
|
@ -236,11 +236,11 @@ public class KeyStoreDelegator extends KeyStoreSpi {
|
|||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
KeyStoreSpi tmp= secondaryKeyStore.newInstance();
|
||||
KeyStoreSpi tmp = secondaryKeyStore.newInstance();
|
||||
bufferedStream.reset();
|
||||
tmp.engineLoad(bufferedStream, password);
|
||||
keystore = tmp;
|
||||
type = secondaryType;
|
||||
bufferedStream.reset();
|
||||
keystore.engineLoad(bufferedStream, password);
|
||||
|
||||
if (debug != null) {
|
||||
debug.println("WARNING: switching from " +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue