My understanding is that Java's PKCS12KeyStore will fabricate an alias string if there is no friendlyName, since every entry inside a KeyStore object must have an alias. I'll take some look tomorrow.
Thanks, Max > On Nov 30, 2021, at 10:01 PM, Michael StJohns <mstjo...@comcast.net> wrote: > > Hi - > > Generically, PKCS12 doesn't require an alias (friendlyName) for a particular > Bag, but does permit it. Which means that getAttributes(String alias) could > fail on a legal PKCS12. It may be worthwhile to add a Set<Entry.Attribute> > KeyStore::getAttributes(int bagNumber) method. > > Mike > > On 11/30/2021 8:15 PM, Weijun Wang wrote: >>> Add `KeyStore::getAttributes` so that one can get the attributes of an >>> entry without retrieving the entry first. This is especially useful for a >>> private key entry which can only be retrieved with a password. >> Weijun Wang has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains seven additional >> commits since the last revision: >> >> - final spec change >> - Merge branch 'master' into 8225181 >> - Merge branch 'master' into 8225181 >> - redine spec >> - more clear and precise spec >> - clarification on protected attributes >> - 8225181: KeyStore should have a getAttributes method >> 8225181: KeyStore should have a getAttributes method >> >> ------------- >> >> Changes: >> - all: https://git.openjdk.java.net/jdk/pull/6026/files >> - new: https://git.openjdk.java.net/jdk/pull/6026/files/901bdf83..702168db >> >> Webrevs: >> - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6026&range=04 >> - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6026&range=03-04 >> >> Stats: 929909 lines in 2271 files changed: 483097 ins; 432951 del; 13861 >> mod >> Patch: https://git.openjdk.java.net/jdk/pull/6026.diff >> Fetch: git fetch https://git.openjdk.java.net/jdk pull/6026/head:pull/6026 >> >> PR: https://git.openjdk.java.net/jdk/pull/6026 > >