Re: Reproducer for JDK-8221218

2022-04-25 Thread Alan Bateman
On 25/04/2022 15:45, Flavia Rainone wrote: Hi everyone, I work with the XNIO ( https://github.com/xnio/xnio/ ) project, led by David Lloyd in CC. I'm not sure if this is the best way to get in touch, but I could not find out how to create an account for OpenJDK Jira to add a comment

Re: RFR: 8284490: Remove finalizer method in java.security.jgss [v8]

2022-04-25 Thread Xue-Lei Andrew Fan
On Tue, 26 Apr 2022 02:02:09 GMT, Weijun Wang wrote: > Where is a test for `GSSCredential`? I did not find a way to create a GSSCredential object successfully, exception thrown. Is there an example I can refer to? - PR: https://git.openjdk.java.net/jdk/pull/8136

Re: RFR: 8284490: Remove finalizer method in java.security.jgss [v8]

2022-04-25 Thread Xue-Lei Andrew Fan
On Tue, 26 Apr 2022 01:53:43 GMT, Weijun Wang wrote: >> Xue-Lei Andrew Fan has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 10 commits: >> >> - Merge and resovle merge conflict >> - change the calling order in dispose() >> -

Re: RFR: 8284910: Buffer clean in PasswordCallback [v5]

2022-04-25 Thread Xue-Lei Andrew Fan
> Please review this password cleanup enhancement in the PasswordCallback > implementation. This is one of the effort to clean up the buffered passwords. > > The PasswordCallback.setPassword() clones the password, but is not registered > for cleanup. An application could call clearPassword()

Re: RFR: JDK-8285504 Minor cleanup could be done in javax.net [v2]

2022-04-25 Thread Jaikiran Pai
On Tue, 26 Apr 2022 00:27:43 GMT, Mark Powers wrote: >> https://bugs.openjdk.java.net/browse/JDK-8285504 >> >> JDK-8273046 is the umbrella bug for this bug. The changes were too large for >> a single code review, so it was decided to split into smaller chunks. This >> is one such chunk: >>

Re: RFR: 8284910: Buffer clean in PasswordCallback [v4]

2022-04-25 Thread Xue-Lei Andrew Fan
On Mon, 25 Apr 2022 20:41:47 GMT, Sean Mullan wrote: >> Xue-Lei Andrew Fan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Code clean up per feedback > > test/jdk/javax/security/auth/callback/PasswordCleanup.java line 58: > >> 56:

Re: RFR: 8284910: Buffer clean in PasswordCallback [v4]

2022-04-25 Thread Xue-Lei Andrew Fan
On Mon, 25 Apr 2022 20:37:38 GMT, Sean Mullan wrote: >> Xue-Lei Andrew Fan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Code clean up per feedback > > test/jdk/javax/security/auth/callback/PasswordCleanup.java line 83: > >> 81:

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Xue-Lei Andrew Fan
On Thu, 21 Apr 2022 19:58:39 GMT, Daniel Jeliński wrote: > Profiling the TLS handshakes using SSLHandshake benchmark shows that a large > portion of time is spent in HandshakeContext initialization, specifically in > DisabledAlgorithmConstraints class. > > There are only a few instances of

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Xue-Lei Andrew Fan
On Mon, 25 Apr 2022 16:04:22 GMT, Anthony Scarpino wrote: > It also shows that more caching probably would help further. +1. - PR: https://git.openjdk.java.net/jdk/pull/8349

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Xue-Lei Andrew Fan
On Mon, 25 Apr 2022 17:22:57 GMT, Daniel Jeliński wrote: >>> With all the above in mind I decided not to use `sun.security.util.Cache` >>> here >> >> I was not meant to use Cache and timeout for this update. >> >> SoftReference and this patch should work good in larger memory boxes. >>

Withdrawn: 8273042: TLS Certificate Compression

2022-04-25 Thread duke
On Wed, 23 Feb 2022 20:15:24 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > Please review the implementation of RFC 8879, TLS Certificate Compression, in > JDK. The TLS Certificate Compression standard is an essential part for QUIC > connections and performance improvement for TLS connections.

RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException

2022-04-25 Thread Valerie Peng
This is to update the method javadoc of java.security.Signature.getParameters() with the missing `@throws UnsupportedOperationException`. In addition, the wording on the returned parameters are updated to match those in Cipher and CipherSpi classes. CSR will be filed later. Thanks, Valerie

Re: RFR: 8284490: Remove finalizer method in java.security.jgss [v8]

2022-04-25 Thread Weijun Wang
On Mon, 25 Apr 2022 06:07:00 GMT, Xue-Lei Andrew Fan wrote: >> Please review the update to remove finalizer method in the >> java.security.jgss module. It is one of the efforts to clean up the use of >> finalizer method in JDK. > > Xue-Lei Andrew Fan has updated the pull request with a new

Re: RFR: 8284490: Remove finalizer method in java.security.jgss [v8]

2022-04-25 Thread Weijun Wang
On Tue, 26 Apr 2022 02:01:10 GMT, Weijun Wang wrote: >> Xue-Lei Andrew Fan has updated the pull request with a new target base due >> to a merge or a rebase. The pull request now contains 10 commits: >> >> - Merge and resovle merge conflict >> - change the calling order in dispose() >> -

Re: RFR: JDK-8285504 Minor cleanup could be done in javax.net [v2]

2022-04-25 Thread Mark Powers
> https://bugs.openjdk.java.net/browse/JDK-8285504 > > JDK-8273046 is the umbrella bug for this bug. The changes were too large for > a single code review, so it was decided to split into smaller chunks. This is > one such chunk: > > open/src/java.base/share/classes/java/net Mark Powers has

Integrated: 8283022: com/sun/crypto/provider/Cipher/AEAD/GCMBufferTest.java failing with -Xcomp after 8273297

2022-04-25 Thread Smita Kamath
On Mon, 18 Apr 2022 05:06:26 GMT, Smita Kamath wrote: > When input length provided to the intrinsic is 8192, only 7680 bytes are > processed as the intrinsic operates on multiples of 768 bytes. > In implGCMCrypt(ByteBuffer src, ByteBuffer dst) method, > dst.put(bout, 0, PARALLEL_LEN) statement

Re: RFR: 8284910: Buffer clean in PasswordCallback [v4]

2022-04-25 Thread Sean Mullan
On Thu, 21 Apr 2022 06:55:22 GMT, Xue-Lei Andrew Fan wrote: >> Please review this password cleanup enhancement in the PasswordCallback >> implementation. This is one of the effort to clean up the buffered >> passwords. >> >> The PasswordCallback.setPassword() clones the password, but is not

Re: RFR: 8284910: Buffer clean in PasswordCallback [v2]

2022-04-25 Thread Sean Mullan
On Mon, 25 Apr 2022 05:48:04 GMT, Xue-Lei Andrew Fan wrote: > > However, I think that we need to carefully check the interactions between > > cleaners and methods that explicitly allow the contents to be cleared so > > that there are not unexpected results. > > I think @RogerRiggs explained

Timeframe for JEP-411 completely removing SecurityManager APIs

2022-04-25 Thread Scott Stark
Hello, I'm Scott Stark of Red Hat, and a member of the Jakarta EE platform dev group (EEPD). I'm currently coordinating the Jakarta EE 10 release that is targeting June of this year (2022). The removal of the SecurityManager as described in JEP-411 has been a topic for the EEPD on may calls this

Reproducer for JDK-8221218

2022-04-25 Thread Flavia Rainone
Hi everyone, I work with the XNIO ( https://github.com/xnio/xnio/ ) project, led by David Lloyd in CC. I'm not sure if this is the best way to get in touch, but I could not find out how to create an account for OpenJDK Jira to add a comment there. We have a reproducer for JDK-8221218, and it

Re: RFR: JDK-8285504 Minor cleanup could be done in javax.net

2022-04-25 Thread Mark Powers
On Mon, 25 Apr 2022 18:48:31 GMT, Alan Bateman wrote: >> https://bugs.openjdk.java.net/browse/JDK-8285504 >> >> JDK-8273046 is the umbrella bug for this bug. The changes were too large for >> a single code review, so it was decided to split into smaller chunks. This >> is one such chunk: >>

Re: RFR: JDK-8285504 Minor cleanup could be done in javax.net

2022-04-25 Thread Alan Bateman
On Mon, 25 Apr 2022 17:40:13 GMT, Mark Powers wrote: > https://bugs.openjdk.java.net/browse/JDK-8285504 > > JDK-8273046 is the umbrella bug for this bug. The changes were too large for > a single code review, so it was decided to split into smaller chunks. This is > one such chunk: > >

RFR: JDK-8285504 Minor cleanup could be done in javax.net

2022-04-25 Thread Mark Powers
https://bugs.openjdk.java.net/browse/JDK-8285504 JDK-8273046 is the umbrella bug for this bug. The changes were too large for a single code review, so it was decided to split into smaller chunks. This is one such chunk: open/src/java.base/share/classes/java/net - Commit

Re: RFR: 8209038: Clarify the javadoc of Cipher.getParameters() [v2]

2022-04-25 Thread Sean Mullan
On Thu, 21 Apr 2022 23:31:37 GMT, Valerie Peng wrote: >>> > Hmm, I tried the suggested approach in (1), the result looks very >>> > lengthy. Actually, the Cipher.init(..) methods already has a few >>> > paragraphs describing the behavior for parameter generation, perhaps we >>> > should not

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Daniel Jeliński
On Mon, 25 Apr 2022 14:33:13 GMT, Xue-Lei Andrew Fan wrote: >> `SoftReference`s are guaranteed to survive one GC after use; beyond that >> their lifespan is determined by `SoftRefLRUPolicyMSPerMB` and the amount of >> memory available. > >> With all the above in mind I decided not to use

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Sean Coffey
On Thu, 21 Apr 2022 19:58:39 GMT, Daniel Jeliński wrote: > Profiling the TLS handshakes using SSLHandshake benchmark shows that a large > portion of time is spent in HandshakeContext initialization, specifically in > DisabledAlgorithmConstraints class. > > There are only a few instances of

Re: RFR: 8285389: EdDSA trimming zeros

2022-04-25 Thread Sean Mullan
On Sun, 24 Apr 2022 15:54:15 GMT, Xue-Lei Andrew Fan wrote: > I like this explanation more. I have no more comment about the patch. Please > add a noreg label in JBS. `noreg-sqe` seems appropriate. - PR: https://git.openjdk.java.net/jdk/pull/8372

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Anthony Scarpino
On Thu, 21 Apr 2022 19:58:39 GMT, Daniel Jeliński wrote: > Profiling the TLS handshakes using SSLHandshake benchmark shows that a large > portion of time is spent in HandshakeContext initialization, specifically in > DisabledAlgorithmConstraints class. > > There are only a few instances of

Integrated: 8285389: EdDSA trimming zeros

2022-04-25 Thread Anthony Scarpino
On Fri, 22 Apr 2022 21:04:58 GMT, Anthony Scarpino wrote: > Hi, > > I'd like a code review of this change to EdDSA. ed25519 and ed448 internally > was trimming extra zeros off the end of the signature before processing. This > can result in some verify testing failures which are strict about

Re: Java Cryptographic Extension Survey

2022-04-25 Thread Anthony Scarpino
Reminder this survey ends Friday. Please fill it out if you have not. Thanks On 4/12/22 8:10 AM, Anthony Scarpino wrote: Hello, Java Cryptographic Extension (JCE) has been in Java SE for a long time and has made incremental changes over the years.  Looking forward, we would like to know

Re: RFR: 8284490: Remove finalizer method in java.security.jgss [v7]

2022-04-25 Thread Xue-Lei Andrew Fan
On Fri, 22 Apr 2022 13:27:12 GMT, Daniel Fuchs wrote: > Please get another reviewer for the security-libs related and native changes. @wangweij Did you have cycle and have another look at the update? - PR: https://git.openjdk.java.net/jdk/pull/8136

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Xue-Lei Andrew Fan
On Mon, 25 Apr 2022 13:59:44 GMT, Daniel Jeliński wrote: >> FWIW: I wouldn't expect `SoftReference` (as opposed to `WeakReference`) to >> be eagerly cleaned. > > `SoftReference`s are guaranteed to survive one GC after use; beyond that > their lifespan is determined by `SoftRefLRUPolicyMSPerMB`

Re: RFR: 8285516: clearPassword should be called in a finally try block [v2]

2022-04-25 Thread Xue-Lei Andrew Fan
> Hi, > > Could I have the simple update reviewed? > > In the PKCS12 key store implementation, the PBEKeySpec.clearPassword() should > be called in a finally try block. Otherwise, the password cleanup could be > interrupted by exceptions. > > Thanks, > Xuelei Xue-Lei Andrew Fan has updated

Re: RFR: 8285516: clearPassword should be called in a finally try block

2022-04-25 Thread Xue-Lei Andrew Fan
On Mon, 25 Apr 2022 13:23:53 GMT, Weijun Wang wrote: > Change looks fine. One tiny enhancement to make: The "throw" line seems only > 3 spaces indented. Nice catch. Thank you! - PR: https://git.openjdk.java.net/jdk/pull/8377

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Daniel Jeliński
On Mon, 25 Apr 2022 13:22:34 GMT, Daniel Fuchs wrote: >> Right, soft references are likely to be cleaned if they are not used in an >> entire GC cycle. >> Using a soft reference for each map entry would not help here; note that all >> keys and all values in this map are GC roots (keys are enum

Re: RFR: 8285516: clearPassword should be called in a finally try block

2022-04-25 Thread Weijun Wang
On Sun, 24 Apr 2022 05:13:36 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > Could I have the simple update reviewed? > > In the PKCS12 key store implementation, the PBEKeySpec.clearPassword() should > be called in a finally try block. Otherwise, the password cleanup could be > interrupted by

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Daniel Fuchs
On Mon, 25 Apr 2022 06:46:20 GMT, Daniel Jeliński wrote: >> src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java >> line 105: >> >>> 103: private final Set disabledAlgorithms; >>> 104: private final Constraints algorithmConstraints; >>> 105: private

Re: RFR: 8285516: clearPassword should be called in a finally try block

2022-04-25 Thread Sean Mullan
On Sun, 24 Apr 2022 05:13:36 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > Could I have the simple update reviewed? > > In the PKCS12 key store implementation, the PBEKeySpec.clearPassword() should > be called in a finally try block. Otherwise, the password cleanup could be > interrupted by

Re: A possible JEP to replace SecurityManager after JEP 411

2022-04-25 Thread David Lloyd
On Fri, Apr 22, 2022 at 10:04 PM Martin Balao wrote: > In my view, authorization decisions at higher layer generally > have better context, are more clear and less riskier. At a lower layer > there is more complexity and chances of both subtle combinations or > unseen paths that may lead to check

Re: RFR: 8285398: Cache the results of constraint checks

2022-04-25 Thread Daniel Jeliński
On Sat, 23 Apr 2022 14:57:01 GMT, Xue-Lei Andrew Fan wrote: >> Profiling the TLS handshakes using SSLHandshake benchmark shows that a large >> portion of time is spent in HandshakeContext initialization, specifically in >> DisabledAlgorithmConstraints class. >> >> There are only a few

Re: RFR: 8284490: Remove finalizer method in java.security.jgss [v8]

2022-04-25 Thread Xue-Lei Andrew Fan
> Please review the update to remove finalizer method in the java.security.jgss > module. It is one of the efforts to clean up the use of finalizer method in > JDK. Xue-Lei Andrew Fan has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains