Implementing an Authorization framework on Java.

2023-02-06 Thread Peter Firmstone
Hello OpenJDK folk, SecurityManager, AccessController and AccessControlContext will be removed in a future version of Java. Just briefly: Our software is heavily dependant on Java's Authorization framework, we use ProtectionDomain's to represent remote services for authorization decisions. 

Re: RFR: 8301443: Clean broken comments from Windows code [v5]

2023-02-06 Thread Julian Waters
> Several comments are technically broken in Windows code, this change cleans > up the broken comments that managed to slip past reviewers during Integration Julian Waters has updated the pull request incrementally with two additional commits since the last revision: - D3DVertexCacher.cpp - a

Re: RFR: 8301443: Clean broken comments from Windows code [v4]

2023-02-06 Thread Alexey Ivanov
On Mon, 6 Feb 2023 03:37:03 GMT, Julian Waters wrote: >> Several comments are technically broken in Windows code, this change cleans >> up the broken comments that managed to slip past reviewers during Integration > > Julian Waters has updated the pull request incrementally with one additional

Re: RFR: 8245654: Add Certigna Root CA

2023-02-06 Thread Sean Mullan
On Wed, 1 Feb 2023 21:28:25 GMT, Rajan Halade wrote: > This fix adds Certigna root CA to cacerts trust store. Marked as reviewed by mullan (Reviewer). - PR: https://git.openjdk.org/jdk/pull/12376

Re: RFR: JDK-8300416 java.security.MessageDigestSpi clone can result in thread-unsafe clones [v4]

2023-02-06 Thread Mark Powers
> https://bugs.openjdk.org/browse/JDK-8300416 Mark Powers has updated the pull request incrementally with one additional commit since the last revision: added comment - Changes: - all: https://git.openjdk.org/jdk/pull/12348/files - new: https://git.openjdk.org/jdk/pull/12348/

Integrated: 8300259: Add test coverage for processing of pending block files in signed JARs

2023-02-06 Thread Eirik Bjorsnos
On Mon, 16 Jan 2023 11:44:36 GMT, Eirik Bjorsnos wrote: > This PR adds test coverage for pending block files in signed JAR files > > A signed JAR has pending block files if the block file [RSA, DSA, EC] comes > before the corresponding signature file [SF] in the JAR. > > JarVerifier.processEn

Integrated: 8301788: AlgorithmId should keep lowercase characters from 3rd party providers

2023-02-06 Thread Weijun Wang
On Fri, 3 Feb 2023 15:32:57 GMT, Weijun Wang wrote: > Keep the "NAME -> 1.2.3.4" mapping unchanged but modify "1.2.3.4 -> NAME" to > "1.2.3.4 -> Name". This pull request has now been integrated. Changeset: b5697420 Author:Weijun Wang URL: https://git.openjdk.org/jdk/commit/b5697420

Re: RFR: 8301788: AlgorithmId should keep lowercase characters from 3rd party providers [v3]

2023-02-06 Thread Weijun Wang
> Keep the "NAME -> 1.2.3.4" mapping unchanged but modify "1.2.3.4 -> NAME" to > "1.2.3.4 -> Name". Weijun Wang has updated the pull request incrementally with two additional commits since the last revision: - useless import - fix comments - Changes: - all: https://git.openjdk

Re: RFR: 8301788: AlgorithmId should keep lowercase characters from 3rd party providers [v2]

2023-02-06 Thread Sean Mullan
On Mon, 6 Feb 2023 16:32:20 GMT, Weijun Wang wrote: >> test/jdk/sun/security/x509/AlgorithmId/Uppercase.java line 30: >> >>> 28: * @summary AlgorithmId should keep lowercase characters from 3rd party >>> providers >>> 29: * @modules java.base/sun.security.x509 >>> 30: * java.base/su

Re: RFR: 8301788: AlgorithmId should keep lowercase characters from 3rd party providers [v3]

2023-02-06 Thread Sean Mullan
On Mon, 6 Feb 2023 16:39:31 GMT, Weijun Wang wrote: >> Keep the "NAME -> 1.2.3.4" mapping unchanged but modify "1.2.3.4 -> NAME" to >> "1.2.3.4 -> Name". > > Weijun Wang has updated the pull request incrementally with two additional > commits since the last revision: > > - useless import > -

Re: RFR: 8301788: AlgorithmId should keep lowercase characters from 3rd party providers [v2]

2023-02-06 Thread Weijun Wang
On Mon, 6 Feb 2023 16:01:17 GMT, Sean Mullan wrote: >> Weijun Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> impl not necessary > > test/jdk/sun/security/x509/AlgorithmId/Uppercase.java line 30: > >> 28: * @summary AlgorithmId sh

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v2]

2023-02-06 Thread Eirik Bjorsnos
On Mon, 6 Feb 2023 15:56:09 GMT, Claes Redestad wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Spelling fix in test data for non-ascii latin1 string > > test/jdk/java/util/zip/ZipFile/InvalidBytesInEntryNameOrCo

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v3]

2023-02-06 Thread Eirik Bjorsnos
> After finding a hash match, getEntryPos needs to compare the lookup name up > to the encoded entry name in the CEN. This comparison is done by decoding the > entry name into a String. The names can then be compared using the String > API. This decoding step adds a significat cost to this metho

Re: RFR: 8301788: AlgorithmId should keep lowercase characters from 3rd party providers [v2]

2023-02-06 Thread Sean Mullan
On Fri, 3 Feb 2023 16:11:21 GMT, Weijun Wang wrote: >> Keep the "NAME -> 1.2.3.4" mapping unchanged but modify "1.2.3.4 -> NAME" to >> "1.2.3.4 -> Name". > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > impl not necessary s

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v2]

2023-02-06 Thread Claes Redestad
On Mon, 6 Feb 2023 15:21:10 GMT, Eirik Bjorsnos wrote: >> After finding a hash match, getEntryPos needs to compare the lookup name up >> to the encoded entry name in the CEN. This comparison is done by decoding >> the entry name into a String. The names can then be compared using the >> String

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v2]

2023-02-06 Thread Claes Redestad
On Mon, 6 Feb 2023 15:21:10 GMT, Eirik Bjorsnos wrote: >> After finding a hash match, getEntryPos needs to compare the lookup name up >> to the encoded entry name in the CEN. This comparison is done by decoding >> the entry name into a String. The names can then be compared using the >> String

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v2]

2023-02-06 Thread Claes Redestad
On Mon, 6 Feb 2023 15:14:37 GMT, Eirik Bjorsnos wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Spelling fix in test data for non-ascii latin1 string > > test/jdk/java/util/zip/ZipFile/TestZipFileEncodings.java l

Re: RFR: 8300259: Add test coverage for processing of pending block files in signed JARs [v2]

2023-02-06 Thread Weijun Wang
On Tue, 17 Jan 2023 18:54:13 GMT, Eirik Bjorsnos wrote: >> This PR adds test coverage for pending block files in signed JAR files >> >> A signed JAR has pending block files if the block file [RSA, DSA, EC] comes >> before the corresponding signature file [SF] in the JAR. >> >> JarVerifier.pro

Integrated: 8301167: Update VerifySignedJar to actually exercise and test verification

2023-02-06 Thread Eirik Bjorsnos
On Wed, 25 Jan 2023 17:38:13 GMT, Eirik Bjorsnos wrote: > This PR resurrects VerifySignedJar which currently tests nothing. > > VerifySignedJar currently verifies a binary JAR which was signed with SHA-1 > back in April 2000. Because SHA-1 signed JARs has been disabled for a while, > the JAR i

Re: RFR: 8301167: Update VerifySignedJar to actually exercise and test verification [v2]

2023-02-06 Thread Weijun Wang
On Mon, 6 Feb 2023 09:16:45 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/jar/JarFile/VerifySignedJar.java line 76: >> >>> 74: // Read entry by name >>> 75: ZipEntry ze = >>> Objects.requireNonNull(jf.getEntry("getprop.class")); >>> 76: JarEntry je = >>>

Re: RFR: 8301167: Update VerifySignedJar to actually exercise and test verification [v3]

2023-02-06 Thread Weijun Wang
On Mon, 6 Feb 2023 09:21:29 GMT, Eirik Bjorsnos wrote: >> This PR resurrects VerifySignedJar which currently tests nothing. >> >> VerifySignedJar currently verifies a binary JAR which was signed with SHA-1 >> back in April 2000. Because SHA-1 signed JARs has been disabled for a while, >> the J

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v2]

2023-02-06 Thread Eirik Bjorsnos
On Mon, 6 Feb 2023 15:17:14 GMT, Eirik Bjorsnos wrote: >> After finding a hash match, getEntryPos needs to compare the lookup name up >> to the encoded entry name in the CEN. This comparison is done by decoding >> the entry name into a String. The names can then be compared using the >> String

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos [v2]

2023-02-06 Thread Eirik Bjorsnos
> After finding a hash match, getEntryPos needs to compare the lookup name up > to the encoded entry name in the CEN. This comparison is done by decoding the > entry name into a String. The names can then be compared using the String > API. This decoding step adds a significat cost to this metho

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos

2023-02-06 Thread Claes Redestad
On Mon, 6 Feb 2023 11:56:22 GMT, Eirik Bjorsnos wrote: >> src/java.base/share/classes/java/lang/System.java line 2671: >> >>> 2669: if (false) { >>> 2670: // Arrays.mismatch without the range checks (~5% >>> faster micro getEntryHit) >>> 2671:

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos

2023-02-06 Thread Claes Redestad
On Mon, 30 Jan 2023 10:32:38 GMT, Eirik Bjorsnos wrote: > After finding a hash match, getEntryPos needs to compare the lookup name up > to the encoded entry name in the CEN. This comparison is done by decoding the > entry name into a String. The names can then be compared using the String > AP

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos

2023-02-06 Thread Claes Redestad
On Mon, 6 Feb 2023 12:01:19 GMT, Eirik Bjorsnos wrote: >> Nice, I have updated the PR such that the new shared secret is replaced with >> using getBytesNoRepl instead. If there is a performance difference, it seems >> to hide in the noise. >> >> I had expected such a regression to be caught by

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos

2023-02-06 Thread Eirik Bjorsnos
On Mon, 30 Jan 2023 14:20:58 GMT, Eirik Bjorsnos wrote: >> After finding a hash match, getEntryPos needs to compare the lookup name up >> to the encoded entry name in the CEN. This comparison is done by decoding >> the entry name into a String. The names can then be compared using the >> Strin

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos

2023-02-06 Thread Claes Redestad
On Mon, 6 Feb 2023 14:27:36 GMT, Claes Redestad wrote: >> Interesting. Would be nice to solve this in the JIT! >> >> This disabled code got deleted in my last commit, but it seems like you have >> a good analysis so we can let it go now. > > Right. I might have fumbled this experiment a bit, an

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos

2023-02-06 Thread Eirik Bjorsnos
On Mon, 6 Feb 2023 11:47:42 GMT, Eirik Bjorsnos wrote: >> src/java.base/share/classes/java/lang/System.java line 2668: >> >>> 2666: @Override >>> 2667: public int mismatchUTF8(String str, byte[] b, int >>> fromIndex, int toIndex) { >>> 2668: byte[] encode

RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos

2023-02-06 Thread Eirik Bjorsnos
After finding a hash match, getEntryPos needs to compare the lookup name up to the encoded entry name in the CEN. This comparison is done by decoding the entry name into a String. The names can then be compared using the String API. This decoding step adds a significat cost to this method. This

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos

2023-02-06 Thread Eirik Bjorsnos
On Sun, 5 Feb 2023 22:13:50 GMT, Claes Redestad wrote: >> After finding a hash match, getEntryPos needs to compare the lookup name up >> to the encoded entry name in the CEN. This comparison is done by decoding >> the entry name into a String. The names can then be compared using the >> String

Re: RFR: 8301873: Avoid string decoding in ZipFile.Source.getEntryPos

2023-02-06 Thread Eirik Bjorsnos
On Mon, 30 Jan 2023 10:32:38 GMT, Eirik Bjorsnos wrote: > After finding a hash match, getEntryPos needs to compare the lookup name up > to the encoded entry name in the CEN. This comparison is done by decoding the > entry name into a String. The names can then be compared using the String > AP

Re: RFR: 8298868: Update EngineCloseOnAlert.java for changes to TLS implementation [v6]

2023-02-06 Thread Matthew Donovan
> Refactored the code a little bit and updated the test for changes to the TLS > state machine. Matthew Donovan has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits: - fixed conflict - updated SSL context - fixed conflict

Re: RFR: 8301167: Update VerifySignedJar to actually exercise and test verification [v2]

2023-02-06 Thread Eirik Bjorsnos
On Mon, 6 Feb 2023 04:09:29 GMT, Weijun Wang wrote: >> Eirik Bjorsnos has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add whitespace after "if" >> >> Co-authored-by: Andrey Turbanov > > test/jdk/java/util/jar/JarFile/VerifySignedJa

Re: RFR: 8301167: Update VerifySignedJar to actually exercise and test verification [v3]

2023-02-06 Thread Eirik Bjorsnos
> This PR resurrects VerifySignedJar which currently tests nothing. > > VerifySignedJar currently verifies a binary JAR which was signed with SHA-1 > back in April 2000. Because SHA-1 signed JARs has been disabled for a while, > the JAR is treated as unsigned so the test doesn't really test anyt