Re: RFR: 8286423: Destroy password protection in the example code in KeyStore [v3]

2022-05-11 Thread Weijun Wang
On Wed, 11 May 2022 05:53:21 GMT, Xue-Lei Andrew Fan  wrote:

>> Hi,
>> 
>> May I have this simple example update in the KeyStore specification?
>> 
>> Password protection should be destroyed in the example code in KeyStore 
>> specification. Otherwise, applications may just copy and past the code, and 
>> forget to clean up password protection.
>> 
>> It's a trivial update, and may not worthy of a CSR.  But please let me know 
>> if you would like to have a CSR filed.
>> 
>> Thanks,
>> Xuelei
>
> Xue-Lei Andrew Fan has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   More udapte

Marked as reviewed by weijun (Reviewer).

-

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


Re: RFR: 8286423: Destroy password protection in the example code in KeyStore [v3]

2022-05-10 Thread Xue-Lei Andrew Fan
On Tue, 10 May 2022 22:09:14 GMT, Weijun Wang  wrote:

>> Oops, I tried to check but finally forgot about it.  Thanks!
>
> It's probably better to convert these long example code to snippets, maybe 
> next time.

The length is a little bit long, but it is fine to me.  It may be nice to 
revise the example and description, but let's do it later.  I modified the 
example by using one try clause only.

-

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


Re: RFR: 8286423: Destroy password protection in the example code in KeyStore [v3]

2022-05-10 Thread Xue-Lei Andrew Fan
> Hi,
> 
> May I have this simple example update in the KeyStore specification?
> 
> Password protection should be destroyed in the example code in KeyStore 
> specification. Otherwise, applications may just copy and past the code, and 
> forget to clean up password protection.
> 
> It's a trivial update, and may not worthy of a CSR.  But please let me know 
> if you would like to have a CSR filed.
> 
> Thanks,
> Xuelei

Xue-Lei Andrew Fan has updated the pull request incrementally with one 
additional commit since the last revision:

  More udapte

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8623/files
  - new: https://git.openjdk.java.net/jdk/pull/8623/files/e0bd03d0..442c1fda

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8623=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8623=01-02

  Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8623.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8623/head:pull/8623

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


Re: RFR: 8286423: Destroy password protection in the example code in KeyStore [v2]

2022-05-10 Thread Weijun Wang
On Tue, 10 May 2022 22:03:19 GMT, Xue-Lei Andrew Fan  wrote:

>> src/java.base/share/classes/java/security/KeyStore.java line 165:
>> 
>>> 163:  *}
>>> 164:  *} finally {
>>> 165:  *protParam.destroy();
>> 
>> `KeyStore.ProtectionParameter` does not have a `destroy` method. Only 
>> `PasswordProtection` does.
>
> Oops, I tried to check but finally forgot about it.  Thanks!

It's probably better to convert these long example code to snippets, maybe next 
time.

-

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


Re: RFR: 8286423: Destroy password protection in the example code in KeyStore [v2]

2022-05-10 Thread Weijun Wang
On Tue, 10 May 2022 22:07:47 GMT, Xue-Lei Andrew Fan  wrote:

>> Hi,
>> 
>> May I have this simple example update in the KeyStore specification?
>> 
>> Password protection should be destroyed in the example code in KeyStore 
>> specification. Otherwise, applications may just copy and past the code, and 
>> forget to clean up password protection.
>> 
>> It's a trivial update, and may not worthy of a CSR.  But please let me know 
>> if you would like to have a CSR filed.
>> 
>> Thanks,
>> Xuelei
>
> Xue-Lei Andrew Fan has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Use PasswordProtection

Approved. Although that `mySecretKey` is out of nowhere, but this is just 
example code.

-

Marked as reviewed by weijun (Reviewer).

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


Re: RFR: 8286423: Destroy password protection in the example code in KeyStore [v2]

2022-05-10 Thread Xue-Lei Andrew Fan
On Tue, 10 May 2022 13:36:19 GMT, Weijun Wang  wrote:

>> Xue-Lei Andrew Fan has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Use PasswordProtection
>
> src/java.base/share/classes/java/security/KeyStore.java line 165:
> 
>> 163:  *}
>> 164:  *} finally {
>> 165:  *protParam.destroy();
> 
> `KeyStore.ProtectionParameter` does not have a `destroy` method. Only 
> `PasswordProtection` does.

Oops, I tried to check but finally forgot about it.  Thanks!

-

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


Re: RFR: 8286423: Destroy password protection in the example code in KeyStore [v2]

2022-05-10 Thread Xue-Lei Andrew Fan
> Hi,
> 
> May I have this simple example update in the KeyStore specification?
> 
> Password protection should be destroyed in the example code in KeyStore 
> specification. Otherwise, applications may just copy and past the code, and 
> forget to clean up password protection.
> 
> It's a trivial update, and may not worthy of a CSR.  But please let me know 
> if you would like to have a CSR filed.
> 
> Thanks,
> Xuelei

Xue-Lei Andrew Fan has updated the pull request incrementally with one 
additional commit since the last revision:

  Use PasswordProtection

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8623/files
  - new: https://git.openjdk.java.net/jdk/pull/8623/files/12c745d9..e0bd03d0

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk=8623=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk=8623=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8623.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8623/head:pull/8623

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


Re: RFR: 8286423: Destroy password protection in the example code in KeyStore

2022-05-10 Thread Weijun Wang
On Tue, 10 May 2022 04:13:43 GMT, Xue-Lei Andrew Fan  wrote:

> Hi,
> 
> May I have this simple example update in the KeyStore specification?
> 
> Password protection should be destroyed in the example code in KeyStore 
> specification. Otherwise, applications may just copy and past the code, and 
> forget to clean up password protection.
> 
> It's a trivial update, and may not worthy of a CSR.  But please let me know 
> if you would like to have a CSR filed.
> 
> Thanks,
> Xuelei

src/java.base/share/classes/java/security/KeyStore.java line 165:

> 163:  *}
> 164:  *} finally {
> 165:  *protParam.destroy();

`KeyStore.ProtectionParameter` does not have a `destroy` method. Only 
`PasswordProtection` does.

-

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


RFR: 8286423: Destroy password protection in the example code in KeyStore

2022-05-09 Thread Xue-Lei Andrew Fan
Hi,

May I have this simple example update in the KeyStore specification?

Password protection should be destroyed in the example code in KeyStore 
specification. Otherwise, applications may just copy and past the code, and 
forget to clean up password protection.

It's a trivial update, and may not worthy of a CSR.  But please let me know if 
you would like to have a CSR filed.

Thanks,
Xuelei

-

Commit messages:
 - 8286423: Destroy password protection in the example code in KeyStore

Changes: https://git.openjdk.java.net/jdk/pull/8623/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8623=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8286423
  Stats: 18 lines in 1 file changed: 3 ins; 0 del; 15 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8623.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8623/head:pull/8623

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