Re: RFR: 8225181: KeyStore should have a getAttributes method [v5]

2021-12-03 Thread Sean Mullan
On Wed, 1 Dec 2021 01:15:27 GMT, 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

Marked as reviewed by mullan (Reviewer).

-

PR: https://git.openjdk.java.net/jdk/pull/6026


Re: RFR: 8225181: KeyStore should have a getAttributes method [v5]

2021-12-01 Thread Michael StJohns

On 11/30/2021 10:07 PM, Wei-Jun Wang wrote:

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.


Ah - I see it now in PKCS12KeyStore - it assigns an "unfriendlyName" as 
an alias if "friendlyName" is missing - basically "0", "1", etc.


Thanks - Mike



Thanks,
Max


On Nov 30, 2021, at 10:01 PM, Michael StJohns  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 
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=6026=04
  - incr: https://webrevs.openjdk.java.net/?repo=jdk=6026=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






Re: RFR: 8225181: KeyStore should have a getAttributes method [v5]

2021-11-30 Thread Wei-Jun Wang
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  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 
> 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=6026=04
>>  - incr: https://webrevs.openjdk.java.net/?repo=jdk=6026=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
> 
> 



Re: RFR: 8225181: KeyStore should have a getAttributes method [v5]

2021-11-30 Thread Michael StJohns

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 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=6026=04
  - incr: https://webrevs.openjdk.java.net/?repo=jdk=6026=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





Re: RFR: 8225181: KeyStore should have a getAttributes method [v5]

2021-11-30 Thread Weijun Wang
> 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=6026=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=6026=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