-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b77
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8136046 | emb-9 | Vincent Ryan | P3 | Resolved | Fixed | team |
The KeyStore.load method supports loading a keystore with a KeyStore.LoadStoreParameter that encapsulates the keystore password.
Currently, supplying a custom LoadStoreParameter class results in an UnsupportedOperationException.
For example, supplying the following custom class should not throw an exception:
static class MyLoadStoreParameter implements KeyStore.LoadStoreParameter {
private KeyStore.ProtectionParameter protection;
MyLoadStoreParameter (KeyStore.ProtectionParameter protection) {
this.protection = protection;
}
public KeyStore.ProtectionParameter getProtectionParameter() {
return protection;
}
}
:
myKeystore.load(new MyLoadStoreParameter(
new KeyStore.PasswordProtection(KEYSTORE_PASSWORD));
Currently, supplying a custom LoadStoreParameter class results in an UnsupportedOperationException.
For example, supplying the following custom class should not throw an exception:
static class MyLoadStoreParameter implements KeyStore.LoadStoreParameter {
private KeyStore.ProtectionParameter protection;
MyLoadStoreParameter (KeyStore.ProtectionParameter protection) {
this.protection = protection;
}
public KeyStore.ProtectionParameter getProtectionParameter() {
return protection;
}
}
:
myKeystore.load(new MyLoadStoreParameter(
new KeyStore.PasswordProtection(KEYSTORE_PASSWORD));
- backported by
-
JDK-8136046 Support loading a keystore with a custom KeyStore.LoadStoreParameter class
-
- Resolved
-
- relates to
-
JDK-8194307 KeyStore#getInstance with custom LoadStoreParameter succeeds with invalid password
-
- Closed
-