Re: RFR: 8254935: Deprecate the PSSParameterSpec(int) constructor [v5]

2022-03-25 Thread Weijun Wang
On Sat, 26 Mar 2022 00:27:19 GMT, Valerie Peng wrote: >> Almost the whole class spec is copied from PKCS #1 but at the end you have >> "defined in the ASN.1 encoding from the PKCS#1 standard", which might make >> people wonder if it is something else. If you don't want to remove anything, >>

Re: RFR: 8254935: Deprecate the PSSParameterSpec(int) constructor [v5]

2022-03-25 Thread Valerie Peng
On Fri, 25 Mar 2022 21:49:07 GMT, Weijun Wang wrote: >> I am not sure if everyone reads the complete spec from class to fields and >> methods. Which part do you want to remove and just use "defined above"? >> Personally, I find "above" kind of vague... It's better to keep the comment >> near

Re: RFR: 8254935: Deprecate the PSSParameterSpec(int) constructor [v5]

2022-03-25 Thread Weijun Wang
On Fri, 25 Mar 2022 21:34:28 GMT, Valerie Peng wrote: >> src/java.base/share/classes/java/security/spec/PSSParameterSpec.java line 78: >> >>> 76: * Please do not rely on {@code PSSParameterSpec.DEFAULT} unless these >>> 77: * values are really what you want to use. >>> 78: * >> >> I just

Re: RFR: 8254935: Deprecate the PSSParameterSpec(int) constructor [v5]

2022-03-25 Thread Valerie Peng
On Fri, 25 Mar 2022 01:33:12 GMT, Weijun Wang wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> More minor edits. > > src/java.base/share/classes/java/security/spec/PSSParameterSpec.java line 78: > >> 76: * Please

Integrated: 8283691: Classes in java.security still reference deprecated classes in spec

2022-03-25 Thread Weijun Wang
On Fri, 25 Mar 2022 15:34:23 GMT, Weijun Wang wrote: > Some spec cleanup. This pull request has now been integrated. Changeset: e97cf157 Author:Weijun Wang URL: https://git.openjdk.java.net/jdk/commit/e97cf157cf20aeaef4a8c16fed6f3bb2bc933819 Stats: 6 lines in 3 files changed: 0

Re: RFR: 8283711: Remove redundant 'new String' calls after concatenation

2022-03-25 Thread Vicente Romero
On Sun, 20 Mar 2022 12:07:52 GMT, Andrey Turbanov wrote: > Result of string concatenation is a newly created String object. There is no > need it wrap it in another 'new String' call. > Such calls are confusing and produce warnings in IDE. Without them code is > easier to read. > Similar

Re: RFR: 8283711: Remove redundant 'new String' calls after concatenation

2022-03-25 Thread Bradford Wetmore
On Sun, 20 Mar 2022 12:07:52 GMT, Andrey Turbanov wrote: > Result of string concatenation is a newly created String object. There is no > need it wrap it in another 'new String' call. > Such calls are confusing and produce warnings in IDE. Without them code is > easier to read. > Similar

Re: RFR: 8283691: Classes in java.security still reference deprecated classes in spec

2022-03-25 Thread Bradford Wetmore
On Fri, 25 Mar 2022 15:34:23 GMT, Weijun Wang wrote: > Some spec cleanup. LGTM. - Marked as reviewed by wetmore (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7961

RFR: 8283711: Remove redundant 'new String' calls after concatenation

2022-03-25 Thread Andrey Turbanov
Result of string concatenation is a newly created String object. There is no need it wrap it in another 'new String' call. Such calls are confusing and produce warnings in IDE. Without them code is easier to read. Similar cleanup [JDK-8273375](https://bugs.openjdk.java.net/browse/JDK-8273375)

Re: "Pluggable" key serialization in JCE/JCA

2022-03-25 Thread Anders Rundgren
Hi Michael & the JDK crypto team, Although it might be cool writing a JEP it is not really my job. There are also multiple ways of addressing this issue. BTW, the COSE/JOSE folks who are about to introduce new algorithms want to overload RFC 8037 which defines a key type OKP. I'm not in

Re: RFR: 8283691: Classes in java.security still reference deprecated classes in spec

2022-03-25 Thread Sean Mullan
On Fri, 25 Mar 2022 15:34:23 GMT, Weijun Wang wrote: > Some spec cleanup. Marked as reviewed by mullan (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7961

Re: RFR: 8283691: Classes in java.security still reference deprecated classes in spec

2022-03-25 Thread Hai-May Chao
On Fri, 25 Mar 2022 15:34:23 GMT, Weijun Wang wrote: > Some spec cleanup. Marked as reviewed by hchao (Committer). - PR: https://git.openjdk.java.net/jdk/pull/7961

Re: "Pluggable" key serialization in JCE/JCA

2022-03-25 Thread Anders Rundgren
Hi Michael & the JDK crypto team, Although it might be cool writing a JEP it is not really my job. There are also multiple ways of addressing this issue. BTW, the COSE/JOSE folks who are about to introduce new algorithms want to overload RFC 8037 which defines a key type OKP. I'm not in

Re: "Pluggable" key serialization in JCE/JCA

2022-03-25 Thread Michael StJohns
On 3/25/2022 12:33 PM, Anders Rundgren wrote: On 2022-03-25 17:12, Anthony Scarpino wrote: When you say "construct and EC key", do you mean creating an EC key from an existing set of values via PKCS8 or X509 encoding?  Or are you talking about EC key generation? I was talking about creating

Integrated: 8283665: Two Jarsigner tests needs to be updated with JDK-8267319

2022-03-25 Thread Valerie Peng
On Fri, 25 Mar 2022 05:11:18 GMT, Valerie Peng wrote: > Max, can you please help review this fix? It updates the two jarsigner tests > which are added to the main trunk during the code review of JDK-8267319. > > Mach5 run succeeds. > Thanks, > Valerie This pull request has now been

Re: "Pluggable" key serialization in JCE/JCA

2022-03-25 Thread Anders Rundgren
On 2022-03-25 17:12, Anthony Scarpino wrote: When you say "construct and EC key", do you mean creating an EC key from an existing set of values via PKCS8 or X509 encoding? Or are you talking about EC key generation? I was talking about creating keys from parameter data supplied by for example

Re: RFR: 8282819: Deprecate Locale class constructors

2022-03-25 Thread Naoto Sato
On Fri, 25 Mar 2022 15:37:36 GMT, Roger Riggs wrote: >> Proposing to deprecate the constructors in the `java.util.Locale` class. >> There is already a factory method and a builder to return singletons, so >> there is no need to have constructors anymore unless one purposefully wants >> to

Re: RFR: 8282819: Deprecate Locale class constructors

2022-03-25 Thread Roger Riggs
On Thu, 24 Mar 2022 22:01:30 GMT, Naoto Sato wrote: > Proposing to deprecate the constructors in the `java.util.Locale` class. > There is already a factory method and a builder to return singletons, so > there is no need to have constructors anymore unless one purposefully wants > to create

Re: "Pluggable" key serialization in JCE/JCA

2022-03-25 Thread Michael StJohns
On 3/25/2022 12:07 PM, Michael StJohns wrote: AFAIK, there is still no support for using named curves to construct an EC key. Names curves are MANDATORY in JOSE/CODE. Use AlgorithmParameterGenerator with ECGenParameterSpec.  Works like a charm. Sorry - Got that slightly wrong.  Use this

Re: "Pluggable" key serialization in JCE/JCA

2022-03-25 Thread Anthony Scarpino
When you say "construct and EC key", do you mean creating an EC key from an existing set of values via PKCS8 or X509 encoding? Or are you talking about EC key generation? Tony On 3/25/22 1:03 AM, Anders Rundgren wrote: Hi Mike & the JDK crypto team, What I'm saying is that key

Re: "Pluggable" key serialization in JCE/JCA

2022-03-25 Thread Michael StJohns
On 3/25/2022 4:03 AM, Anders Rundgren wrote: Hi Mike & the JDK crypto team, What I'm saying is that key serialization in Java haven't gotten enough attention.  Examples: AFAIK, there is still no support for using named curves to construct an EC key.  Names curves are MANDATORY in JOSE/CODE.

Re: RFR: 8283665: Two Jarsigner tests needs to be updated with JDK-8267319

2022-03-25 Thread Daniel D . Daugherty
On Fri, 25 Mar 2022 05:11:18 GMT, Valerie Peng wrote: > Max, can you please help review this fix? It updates the two jarsigner tests > which are added to the main trunk during the code review of JDK-8267319. > > Mach5 run succeeds. > Thanks, > Valerie Is this fix going to be integrated soon?

RFR: 8283691: Classes in java.security still reference deprecated classes in spec

2022-03-25 Thread Weijun Wang
Some spec cleanup. - Commit messages: - 8283691: Classes in java.security still reference deprecated classes in spec Changes: https://git.openjdk.java.net/jdk/pull/7961/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=7961=00 Issue:

Re: RFR: 8282819: Deprecate Locale class constructors

2022-03-25 Thread Roger Riggs
On Thu, 24 Mar 2022 22:01:30 GMT, Naoto Sato wrote: > Proposing to deprecate the constructors in the `java.util.Locale` class. > There is already a factory method and a builder to return singletons, so > there is no need to have constructors anymore unless one purposefully wants > to create

Re: RFR: 8283665: Two Jarsigner tests needs to be updated with JDK-8267319

2022-03-25 Thread Weijun Wang
On Fri, 25 Mar 2022 05:11:18 GMT, Valerie Peng wrote: > Max, can you please help review this fix? It updates the two jarsigner tests > which are added to the main trunk during the code review of JDK-8267319. > > Mach5 run succeeds. > Thanks, > Valerie Marked as reviewed by weijun (Reviewer).

Re: "Pluggable" key serialization in JCE/JCA

2022-03-25 Thread Anders Rundgren
Hi Mike & the JDK crypto team, What I'm saying is that key serialization in Java haven't gotten enough attention. Examples: AFAIK, there is still no support for using named curves to construct an EC key. Names curves are MANDATORY in JOSE/CODE. The gap between EdDSA keys as expressed in

Re: RFR: 8283665: Two Jarsigner tests needs to be updated with JDK-8267319

2022-03-25 Thread Hai-May Chao
On Fri, 25 Mar 2022 05:11:18 GMT, Valerie Peng wrote: > Max, can you please help review this fix? It updates the two jarsigner tests > which are added to the main trunk during the code review of JDK-8267319. > > Mach5 run succeeds. > Thanks, > Valerie Marked as reviewed by hchao (Committer).