8225181: KeyStore should have a getAttributes method

Reviewed-by: mullan
This commit is contained in:
Weijun Wang 2021-12-03 18:52:17 +00:00
parent 38f525e96e
commit a729a70c01
6 changed files with 169 additions and 2 deletions

View file

@ -1307,6 +1307,15 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
stream.flush();
}
@Override
public Set<KeyStore.Entry.Attribute> engineGetAttributes(String alias) {
if (!engineContainsAlias(alias)) {
return super.engineGetAttributes(alias);
}
Entry entry = entries.get(alias.toLowerCase(Locale.ENGLISH));
return getAttributes(entry);
}
/**
* Gets a <code>KeyStore.Entry</code> for the specified alias
* with the specified protection parameter.