Re: RFR: 8289768: Clean up unused code [v2]

2022-07-07 Thread Daniel Jeliński
> This patch removes many unused variables and one unused label reported by the > compilers when relevant warnings are enabled. > > The unused code was found by compiling after removing `unused` from the list > of disabled warnings for > [gcc](https://github.com/openjdk/jdk/blob/master/make/au

Re: RFR: 8289274: Cleanup unnecessary null comparison before instanceof check in security modules

2022-07-07 Thread Sean Mullan
On Fri, 24 Jun 2022 18:27:05 GMT, Andrey Turbanov wrote: > Update code checks both non-null and instance of a class in security classes. > The checks and explicit casts could also be replaced with pattern matching > for the instanceof operator. > > See similar cleanup in java.base - > [JDK-825

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-07 Thread Daniel Jeliński
On Wed, 6 Jul 2022 05:32:29 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-07 Thread Weijun Wang
On Wed, 6 Jul 2022 05:32:29 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/Cipher.java

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Weijun Wang
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one Last comments. src/java.base/share/classes/java/sec

Re: RFR: 8289274: Cleanup unnecessary null comparison before instanceof check in security modules

2022-07-07 Thread Sean Mullan
On Wed, 6 Jul 2022 15:12:06 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/sun/security/provider/certpath/RevocationChecker.java >> line 491: >> >>> 489: break; >>> 490: case "SSLServer": >>> 491: result = (t instanceof IOException); >> >

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Mark Powers
On Wed, 6 Jul 2022 19:54:57 GMT, Mark Powers wrote: >> src/java.base/share/classes/java/security/CodeSource.java line 307: >> >>> 305: * and {@code null} certificates all imply >>> 306: * the codesource with the location >>> "http://www.example.com/classes/foo.jar"; >>> 307: * an

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v6]

2022-07-07 Thread Maurizio Cimadamore
> This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision: Turn non-closeable view back into MemorySession impl - Changes: - all: https://git.openjdk.or

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v5]

2022-07-07 Thread Maurizio Cimadamore
> This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains ten commits: - Merge branch 'master' into memory_session_cleanup - Fix ambiguity between sessi

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v4]

2022-07-07 Thread Maurizio Cimadamore
On Wed, 6 Jul 2022 17:07:37 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert implicit vs. heap session changes > > src/java.base/share/classes/jdk/internal/foreign/abi/aarch64/macos/Ma

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v4]

2022-07-07 Thread Jorn Vernee
On Wed, 6 Jul 2022 17:05:51 GMT, Jorn Vernee wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Revert implicit vs. heap session changes > > src/java.base/share/classes/java/lang/invoke/X-VarHandleSegmentView.j

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v4]

2022-07-07 Thread Jorn Vernee
On Fri, 17 Jun 2022 18:39:03 GMT, Maurizio Cimadamore wrote: >> This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 > > Maurizio Cimadamore has updated the pull request incrementally with one > additional commit since the last revision: > > Revert implicit vs. heap session ch

Re: RFR: 8289274: Cleanup unnecessary null comparison before instanceof check in security modules

2022-07-07 Thread Andrey Turbanov
On Sun, 3 Jul 2022 20:17:07 GMT, Attila Szegedi wrote: >> Update code checks both non-null and instance of a class in security classes. >> The checks and explicit casts could also be replaced with pattern matching >> for the instanceof operator. >> >> See similar cleanup in java.base - >> [JDK

Re: RFR: 8289301: P11Cipher should not throw out of bounds exception during padding [v3]

2022-07-07 Thread Valerie Peng
On Mon, 4 Jul 2022 14:22:42 GMT, zzambers wrote: >> SunPkcs11 provider throws out of bounds exception during encryption when >> specific conditions are met. >> >> Exception: >> >> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Array >> index out of range: 32 >> at j

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/CipherSpi.j

Re: RFR: 8284780: Need methods to create pre-sized HashSet and LinkedHashSet [v17]

2022-07-07 Thread Stuart Marks
On Wed, 1 Jun 2022 16:45:35 GMT, liach wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> do it as naotoj said > > 'the new' fix should be applied to newHashMap etc. too. @liach > 'the new' fix should be applied to ne

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v5]

2022-07-07 Thread Maurizio Cimadamore
On Wed, 6 Jul 2022 18:01:28 GMT, Maurizio Cimadamore wrote: >> This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 > > Maurizio Cimadamore has updated the pull request with a new target base due > to a merge or a rebase. The pull request now contains ten commits: > > - Merge b

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Mark Powers
On Wed, 6 Jul 2022 14:04:10 GMT, Weijun Wang wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> aw shucks - another one > > src/java.base/share/classes/java/security/AllPermission.java line 183: > >> 181: * >> 18

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-07 Thread Naoto Sato
On Wed, 6 Jul 2022 05:32:29 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[]

2022-07-07 Thread Сергей Цыпанов
We can skip bounds check and null check for Charset in case we use the array entirely and the Charset is either default one or proven to be non-null. Benchmark results: before Benchmark Mode Cnt Score Error Units StringConstructor.newString

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/CipherSpi.j

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/Cipher.java

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Weijun Wang
On Wed, 6 Jul 2022 19:55:04 GMT, Mark Powers wrote: >> src/java.base/share/classes/javax/crypto/CryptoPermissions.java line 135: >> >>> 133: * object is marked as readonly. >>> 134: * >>> 135: * @see isReadOnly >> >> Should be `PermissionCollection#isReadOnly`. > > @see `{@link P

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/Cipher.java

Re: RFR: 6522064: Aliases from Microsoft CryptoAPI has bad character encoding

2022-07-07 Thread Sean Coffey
On Wed, 8 Jun 2022 13:42:43 GMT, Weijun Wang wrote: > Switch to wide char version of `CertGetNameString` to get the non-ASCII name. LGTM - Marked as reviewed by coffeys (Reviewer). PR: https://git.openjdk.org/jdk/pull/9085

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Mark Powers
On Wed, 6 Jul 2022 23:11:15 GMT, Valerie Peng wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> aw shucks - another one > > src/java.base/share/classes/javax/crypto/CryptoPermission.java line 359: > >> 357: >> 358:

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/CipherSpi.j

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/CryptoAllPe

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v7]

2022-07-07 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8284851 Mark Powers 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 13 additional commits since the last revision

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/CipherOutpu

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/CryptoPermi

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/Cipher.java

Re: RFR: 8289301: P11Cipher should not throw out of bounds exception during padding [v2]

2022-07-07 Thread zzambers
On Wed, 6 Jul 2022 00:07:50 GMT, Valerie Peng wrote: >> I have fixed all the issues, jdk_security tests passed for me (with these >> changes). Thanks > >> I have fixed all the issues, jdk_security tests passed for me (with these >> changes). Thanks > > Looks good, I will approve after the test

Re: [jdk19] RFR: 8287809: Revisit implementation of memory session [v4]

2022-07-07 Thread Jorn Vernee
On Fri, 17 Jun 2022 18:39:03 GMT, Maurizio Cimadamore wrote: >> This is a JDK 19 clone of: https://github.com/openjdk/jdk/pull/9017 > > Maurizio Cimadamore has updated the pull request incrementally with one > additional commit since the last revision: > > Revert implicit vs. heap session ch

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Mark Powers
On Wed, 6 Jul 2022 20:46:44 GMT, Valerie Peng wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> aw shucks - another one > > src/java.base/share/classes/javax/crypto/Cipher.java line 144: > >> 142: * >> 143: * Ever

Re: [Internet]Re: Re: JEP Review Request: TLS Certificate Compression

2022-07-07 Thread Sean Mullan
I haven't had time to look at this in detail yet. I would like a couple more weeks to review the draft. Thanks, Sean On 7/6/22 10:36 AM, xueleifan(XueleiFan) wrote: https://bugs.openjdk.java.net/browse/JDK-8281710 Could I get the JEP reviewed by adding his/her name to the “Reviewed By”

Re: RFR: 8215916: The failure reason of an optional JAAS LoginModule is not logged

2022-07-07 Thread Jayashree Huttanagoudar
On Tue, 14 Jun 2022 19:07:24 GMT, Jayashree Huttanagoudar wrote: > Could you please review the changes? > This patch is to address : > https://bugs.openjdk.org/browse/JDK-8215916?jql=labels%20%3D%20starter-bug I verified the changes with sample example here: https://web.mit.edu/java_v1.5.0_22

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Valerie Peng
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one src/java.base/share/classes/javax/crypto/CipherSpi.j

RE: security/infra/java/security/cert/CertPathValidator/certification/ActalisCA.java failure in jdk20

2022-07-07 Thread Baesken, Matthias
Hi Sean, thanks for confirming. I created https://bugs.openjdk.org/browse/JDK-8289884 8289884: security/infra/java/security/cert/CertPathValidator/certification/ActalisCA.java fails after 8224768 Best regards, Matthias >Yes, I see the same issue. Please file a bug. It is trying to retrieve

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Mark Powers
On Wed, 6 Jul 2022 20:06:02 GMT, Weijun Wang wrote: >> @see `{@link PermissionCollection#isReadOnly}` > > I think `@see PermissionCollection#isReadOnly` is enough. Fixed. - PR: https://git.openjdk.org/jdk/pull/9282

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Mark Powers
On Wed, 6 Jul 2022 20:50:19 GMT, Valerie Peng wrote: >> Mark Powers has updated the pull request incrementally with one additional >> commit since the last revision: >> >> aw shucks - another one > > src/java.base/share/classes/javax/crypto/Cipher.java line 1071: > >> 1069: * Returns th

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v6]

2022-07-07 Thread Weijun Wang
On Tue, 5 Jul 2022 15:37:55 GMT, Mark Powers wrote: >> https://bugs.openjdk.org/browse/JDK-8284851 > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > aw shucks - another one I don't have more comments on the `java.security` pa

Re: RFR: 8215916: The failure reason of an optional JAAS LoginModule is not logged

2022-07-07 Thread Weijun Wang
On Tue, 14 Jun 2022 19:07:24 GMT, Jayashree Huttanagoudar wrote: > Could you please review the changes? > This patch is to address : > https://bugs.openjdk.org/browse/JDK-8215916?jql=labels%20%3D%20starter-bug It will be nice if the test itself can confirm the correctness since this is not a

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v2]

2022-07-07 Thread Weijun Wang
On Wed, 29 Jun 2022 16:13:15 GMT, Jayashree Huttanagoudar wrote: >> src/java.base/share/classes/sun/security/x509/X509CertImpl.java line 742: >> >>> 740: >>> 741: if (id.equalsIgnoreCase(INFO)) { >>> 742: if ((attr.getSuffix() == null)) { >> >> You can remove the parenthes

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v3]

2022-07-07 Thread Jayashree Huttanagoudar
On Wed, 29 Jun 2022 16:08:01 GMT, Jayashree Huttanagoudar wrote: >> Could you please review the changes? >> This is to address the issue: >> https://bugs.openjdk.org/browse/JDK-8283082?jql=labels%20%3D%20starter-bug > > Jayashree Huttanagoudar has updated the pull request incrementally with one

Re: RFR: 8289768: Clean up unused code [v2]

2022-07-07 Thread Chris Plummer
On Wed, 6 Jul 2022 05:32:29 GMT, Daniel Jeliński wrote: >> This patch removes many unused variables and one unused label reported by >> the compilers when relevant warnings are enabled. >> >> The unused code was found by compiling after removing `unused` from the list >> of disabled warnings

Re: RFR: JDK-8284851 Update javax.crypto files to use proper javadoc for mentioned classes [v8]

2022-07-07 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8284851 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: final comments from Valerie - Changes: - all: https://git.openjdk.org/jdk/pull/9282/files - new: https://git.openjdk.org/jd

Re: RFR: 8215916: The failure reason of an optional JAAS LoginModule is not logged

2022-07-07 Thread Jayashree Huttanagoudar
On Tue, 14 Jun 2022 19:07:24 GMT, Jayashree Huttanagoudar wrote: > Could you please review the changes? > This patch is to address : > https://bugs.openjdk.org/browse/JDK-8215916?jql=labels%20%3D%20starter-bug Ok. So the steps what I followed to confirm the patch can be converted to test case

Re: RFR: 8283082: sun.security.x509.X509CertImpl.delete("x509.info.validity") nulls out info field [v2]

2022-07-07 Thread Jayashree Huttanagoudar
On Thu, 7 Jul 2022 14:03:42 GMT, Weijun Wang wrote: > Thanks for adding the test. It looks fine. The name is good. > > Please add a copyright header and a `@test` block comment. You can find a > nearby existing test file and see what they look like. Since the new test > references internal cla

RFR: 8289939: Add flag to restrict public exponent as described in SP 800-56B

2022-07-07 Thread Kevin Driver
[SP 800-56B](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Br2.pdf) stipulates that the publicExponent e "shall" be 65,537 ≤ e < 2^256 - Commit messages: - initial commit for JDK-8289939 Changes: https://git.openjdk.org/jdk/pull/9413/files Webrev: https://we

Re: RFR: 8289908: Skip bounds check for cases when String is constructed from entirely used byte[]

2022-07-07 Thread Roger Riggs
On Thu, 7 Jul 2022 10:21:06 GMT, Сергей Цыпанов wrote: > We can skip bounds check and null check for Charset in case we use the array > entirely and the Charset is either default one or proven to be non-null. > > Benchmark results: > > before > > Benchmark