RFR: 8288050: Add support of SHA-512/224 and SHA-512/256 to the PBKDF2 and PBES2 impls in SunJCE provider

2022-11-23 Thread Valerie Peng
This RFE enhances existing PBE algorithms with the "SHA512/224" and "SHA512/256" support. Current transformation parsing in javax.crypto.Cipher class is re-written to handle the additional "/" in the "SHA512/224" and "SHA512/256" algorithm names. Existing tests are updated with the additional n

RFR: 8297379: Enable the ByteBuffer path of Poly1305 optimizations

2022-11-23 Thread Volodymyr Paprotski
Regarding mainline: - I decided not to 'unroll' the top while loop (i.e. `engineUpdate(byte[] input, int offset, int len)` is unrolled) - It is debatable which version is easier to understand. If this version is 'too complex', I can unroll the top while loop. - I do think this version is incr

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Joe Wang
On Wed, 23 Nov 2022 18:57:03 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >> li

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Joe Wang
On Wed, 23 Nov 2022 18:57:03 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >> li

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Jonathan Gibbons
On Wed, 23 Nov 2022 19:20:53 GMT, Daniel Fuchs wrote: > The java.base/net/, java.http/, java.naming/ changes look reasonable to me - > though like Alan I wonder if it wouldn't be better to have an inline `{@spec > }` tag - similar to `{@systemProperty }`, rather than repeating all the > refere

Re: RFR: 8295146: Clean up native code with newer C/C++ language features [v3]

2022-11-23 Thread Kim Barrett
On Wed, 23 Nov 2022 05:22:10 GMT, Kim Barrett wrote: >> It's to avoid redefining the linkage as static in os_windows.cpp (where it's >> implemented) after an extern declaration (inside the class), which is >> forbidden by C++11: >> >>> The linkages implied by successive declarations for a give

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions [v2]

2022-11-23 Thread Weijun Wang
> This is mostly cleanup. Everything around `DerOutputStream` no longer throws > an `IOException`. This includes: > > - Remove unnecessary `throws IOException` in code and spec > - Remove `catch (IOException ioe)` blocks. If new exception is thrown, remove > further `throws` in code and spec > -

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Daniel Fuchs
On Wed, 23 Nov 2022 18:57:03 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >> li

Re: RFR: 8296546: Add @spec tags to API [v3]

2022-11-23 Thread Jonathan Gibbons
> Please review a "somewhat automated" change to insert `@spec` tags into doc > comments, as appropriate, to leverage the recent new javadoc feature to > generate a new page listing the references to all external specifications > listed in the `@spec` tags. > > "Somewhat automated" means that I

Integrated: 7181214: Need specify SKF translateKey(SecurityKey) method requires instance of PBEKey for PBKDF2 algorithms

2022-11-23 Thread Valerie Peng
On Wed, 23 Nov 2022 01:25:44 GMT, Valerie Peng wrote: > Anyone can help reviewing this trivial RFE? Mostly just making clarifications > on exception messages as submitter requested. Enhanced existing test case to > check on this particular scenario. This pull request has now been integrated.

Re: RFR: 7181214: Need specify SKF translateKey(SecurityKey) method requires instance of PBEKey for PBKDF2 algorithms

2022-11-23 Thread Valerie Peng
On Wed, 23 Nov 2022 01:25:44 GMT, Valerie Peng wrote: > Anyone can help reviewing this trivial RFE? Mostly just making clarifications > on exception messages as submitter requested. Enhanced existing test case to > check on this particular scenario. Thanks for the review~ - PR: h

Re: RFR: 8296408: Make the PCSCException public accessible

2022-11-23 Thread Xuelei Fan
I’m not very sure what the update public APIs may look like. If we are able to collect the possible card exception reasons, the design of CertPathValidatorException and CertPathValidatorException.BasicReason could be a reference. Xuelei > On Nov 23, 2022, at 9:21 AM, Michael StJohns wrote: >

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v12]

2022-11-23 Thread Per Minborg
On Wed, 23 Nov 2022 16:14:52 GMT, Maurizio Cimadamore wrote: >> Per Minborg has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Cleanup > > src/java.base/share/classes/jdk/internal/access/JavaNioAccess.java line 125: > >> 123: * @see

Re: RFR: 8296408: Make the PCSCException public accessible

2022-11-23 Thread Michael StJohns
On 11/22/2022 10:24 PM, Xue-Lei Andrew Fan wrote: On Wed, 23 Nov 2022 02:59:47 GMT, Michael StJohns wrote: … CardException doesn't always pass through the details in a comprehensible way from the underlying cause, … Does it sound like a cause that the public APIs are not sufficient? Alterna

Re: RFR: 8296546: Add @spec tags to API [v2]

2022-11-23 Thread Jonathan Gibbons
On Wed, 23 Nov 2022 12:43:16 GMT, Daniel Fuchs wrote: > Thanks for adding the RFC prefix to the RFC link. What is the purpose of > editing non exported classes though, like those in the `sun.net` subpackages? That was not intentional, and is a result of the scripted edit. I will look to r

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v12]

2022-11-23 Thread Maurizio Cimadamore
On Wed, 23 Nov 2022 12:39:40 GMT, Per Minborg wrote: >> This PR proposes the introduction of **guarding** of the use of >> `DirectBuffer::address` within the JDK. With the introduction of the Foreign >> Function and Memory access, it is possible to derive Buffer instances that >> are backed by

Re: RFR: 8297276: Remove thread text from Subject.current

2022-11-23 Thread Weijun Wang
On Wed, 23 Nov 2022 12:35:17 GMT, Alan Bateman wrote: >> With the introduction of Virtual Threads, the current subject is no longer >> guaranteed to be inherited in a new thread. Remove this requirement until we >> find another way to implement `Subject::current`. > > Just re-reading the javado

Re: RFR: 7181214: Need specify SKF translateKey(SecurityKey) method requires instance of PBEKey for PBKDF2 algorithms

2022-11-23 Thread Weijun Wang
On Wed, 23 Nov 2022 01:25:44 GMT, Valerie Peng wrote: > Anyone can help reviewing this trivial RFE? Mostly just making clarifications > on exception messages as submitter requested. Enhanced existing test case to > check on this particular scenario. Marked as reviewed by weijun (Reviewer). --

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions

2022-11-23 Thread Weijun Wang
On Wed, 23 Nov 2022 12:40:45 GMT, Weijun Wang wrote: >> src/java.base/share/classes/sun/security/x509/CRLExtensions.java line 151: >> >>> 149: >>> 150: DerOutputStream tmp = new DerOutputStream(); >>> 151: if (isExplicit) >> >> Use curley braces. > > I'll do. This is new code.

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v12]

2022-11-23 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8296546: Add @spec tags to API [v2]

2022-11-23 Thread Daniel Fuchs
On Tue, 22 Nov 2022 22:04:57 GMT, Jonathan Gibbons wrote: >> Please review a "somewhat automated" change to insert `@spec` tags into doc >> comments, as appropriate, to leverage the recent new javadoc feature to >> generate a new page listing the references to all external specifications >> li

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions

2022-11-23 Thread Weijun Wang
On Wed, 23 Nov 2022 04:19:42 GMT, Mark Powers wrote: >> src/java.base/share/classes/sun/security/x509/IssuingDistributionPointExtension.java >> line 121: >> >>> 119: boolean hasOnlyUserCerts, boolean hasOnlyCACerts, >>> 120: boolean hasOnlyAttributeCerts, boolean isIndirectCRL)

Re: RFR: 8297065: DerOutputStream operations should not throw IOExceptions

2022-11-23 Thread Weijun Wang
On Wed, 23 Nov 2022 02:28:44 GMT, Mark Powers wrote: >> This is mostly cleanup. Everything around `DerOutputStream` no longer throws >> an `IOException`. This includes: >> >> - Remove unnecessary `throws IOException` in code and spec >> - Remove `catch (IOException ioe)` blocks. If new exceptio

Re: RFR: 8297276: Remove thread text from Subject.current

2022-11-23 Thread Alan Bateman
On Tue, 22 Nov 2022 16:26:30 GMT, Weijun Wang wrote: > With the introduction of Virtual Threads, the current subject is no longer > guaranteed to be inherited in a new thread. Remove this requirement until we > find another way to implement `Subject::current`. Just re-reading the javadoc for S

Re: RFR: 8296024: Usage of DIrectBuffer::address should be guarded [v11]

2022-11-23 Thread Per Minborg
> This PR proposes the introduction of **guarding** of the use of > `DirectBuffer::address` within the JDK. With the introduction of the Foreign > Function and Memory access, it is possible to derive Buffer instances that > are backed by native memory that, in turn, can be closed asynchronously

Re: RFR: 8295010: Reduce if required in EC limbs operations [v6]

2022-11-23 Thread Daniel Jeliński
On Wed, 23 Nov 2022 06:21:05 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? With this update, the result will be >> reduced if required in EC limbs operations in the JDK implementation. >> >> In the current implementation, the EC limbs addition and subtraction re

Re: RFR: 8295010: Reduce if required in EC limbs operations [v6]

2022-11-23 Thread Daniel Jeliński
On Wed, 23 Nov 2022 06:21:05 GMT, Xue-Lei Andrew Fan wrote: >> Hi, >> >> May I have this update reviewed? With this update, the result will be >> reduced if required in EC limbs operations in the JDK implementation. >> >> In the current implementation, the EC limbs addition and subtraction re

Re: RFR: 8295010: Reduce if required in EC limbs operations [v5]

2022-11-23 Thread Xue-Lei Andrew Fan
On Mon, 21 Nov 2022 08:15:53 GMT, Xue-Lei Andrew Fan wrote: > I may run it again after the integration of multiplicative inversion and > point multiplication improvement. After the integration of the improvement above, here is the benchmark numbers with this patch: Benchmark