8278744: KeyStore:getAttributes() not returning unmodifiable Set

Reviewed-by: mullan
This commit is contained in:
Weijun Wang 2021-12-14 18:39:22 +00:00
parent 475ec8e6c5
commit 0cc989b7d2
2 changed files with 65 additions and 1 deletions

View file

@ -1313,7 +1313,7 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
return super.engineGetAttributes(alias);
}
Entry entry = entries.get(alias.toLowerCase(Locale.ENGLISH));
return getAttributes(entry);
return Collections.unmodifiableSet(new HashSet<>(getAttributes(entry)));
}
/**