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

2022-04-13 Thread Xue-Lei Andrew Fan
On Tue, 12 Apr 2022 03:27:59 GMT, Valerie Peng wrote: >> I read the following methods in com.sun.crypto.provider.CipherCore: >> >> void init(int opmode, Key key, AlgorithmParameterSpec params, >> SecureRandom random) >> >> where the 'params' are converted to IV byte array for fu

Re: RFR: 8284796: sun.security.ssl.Finished::toString misses a line feed in the message format pattern

2022-04-13 Thread John Jiang
On Wed, 13 Apr 2022 06:07:43 GMT, Xue-Lei Andrew Fan wrote: >> The log for Finished message looks like the below, >> >> "Finished": { >> "verify data": { >> : ... ... >> }'} // looks weird >> >> because a line feed is missing in the format pattern. >> >> ""Finished": '{'\n" + >> "

Re: RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice

2022-04-13 Thread Daniel Jeliński
On Wed, 13 Apr 2022 06:45:20 GMT, Xue-Lei Andrew Fan wrote: >> During TLS handshake, hundreds of constraints are evaluated to determine >> which cipher suites are usable. Most of the evaluations are performed using >> `HandshakeContext#algorithmConstraints` object. By default that object >> co

Re: RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice

2022-04-13 Thread Claes Redestad
On Tue, 12 Apr 2022 11:28:12 GMT, Daniel Jeliński wrote: > During TLS handshake, hundreds of constraints are evaluated to determine > which cipher suites are usable. Most of the evaluations are performed using > `HandshakeContext#algorithmConstraints` object. By default that object > contains

Re: RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice

2022-04-13 Thread Sean Coffey
On Tue, 12 Apr 2022 11:28:12 GMT, Daniel Jeliński wrote: > During TLS handshake, hundreds of constraints are evaluated to determine > which cipher suites are usable. Most of the evaluations are performed using > `HandshakeContext#algorithmConstraints` object. By default that object > contains

Re: RFR: 8284553: Deprecate the DEFAULT static field of OAEPParameterSpec

2022-04-13 Thread Sean Mullan
On Tue, 12 Apr 2022 01:27:35 GMT, Valerie Peng wrote: > This trivial change is to deprecate the DEFAULT static field of > OAEPParameterSpec class. Wordings are mostly the same as the previous > PSSParameterSpec deprecation change. Rest are just minor code re-factoring. > > The CSR will be file

Re: RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice

2022-04-13 Thread Xue-Lei Andrew Fan
On Wed, 13 Apr 2022 07:50:55 GMT, Daniel Jeliński wrote: >> src/java.base/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java >> line 72: >> >>> 70: } >>> 71: >>> 72: static AlgorithmConstraints wrap(AlgorithmConstraints >>> userSpecifiedConstraints) { >> >> I may update all

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

2022-04-13 Thread xueleifan(XueleiFan)
Ping … Xuelei > On Mar 24, 2022, at 1:05 PM, Sean Mullan wrote: > > > > On 3/21/22 11:49 AM, xueleifan(XueleiFan) wrote: >> Hi, >> >> >> The JDK Enhancement Proposal, TLS Certificate Compression, has been opened >> for community review. Detailed, please refer to the draft: >> >> https://

AlgorithmConstraints caching [ was Re: RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice]

2022-04-13 Thread Anthony Scarpino
Hi Sean, Caching is an interesting idea. I've wondered for a while off and on about how to speed it up, but hadn't come up with a solution I liked. The complication with caching is while something like an algorithm name only could be easy in a hashmap, it gets more complicated when you get i

Re: RFR: 8284553: Deprecate the DEFAULT static field of OAEPParameterSpec

2022-04-13 Thread Valerie Peng
On Tue, 12 Apr 2022 01:27:35 GMT, Valerie Peng wrote: > This trivial change is to deprecate the DEFAULT static field of > OAEPParameterSpec class. Wordings are mostly the same as the previous > PSSParameterSpec deprecation change. Rest are just minor code re-factoring. > > The CSR will be file

Re: RFR: 8284553: Deprecate the DEFAULT static field of OAEPParameterSpec

2022-04-13 Thread Valerie Peng
On Wed, 13 Apr 2022 15:35:38 GMT, Sean Mullan wrote: >> This trivial change is to deprecate the DEFAULT static field of >> OAEPParameterSpec class. Wordings are mostly the same as the previous >> PSSParameterSpec deprecation change. Rest are just minor code re-factoring. >> >> The CSR will be

Re: RFR: 8284553: Deprecate the DEFAULT static field of OAEPParameterSpec

2022-04-13 Thread Sean Mullan
On Wed, 13 Apr 2022 18:28:33 GMT, Valerie Peng wrote: >> src/java.base/share/classes/javax/crypto/spec/OAEPParameterSpec.java line 81: >> >>> 79: * parameters for mgf -- MGF1ParameterSpec.SHA1 >>> 80: * source of encoding input -- PSource.PSpecified.DEFAULT >>> 81: * >> >> I think y

Re: RFR: 8284553: Deprecate the DEFAULT static field of OAEPParameterSpec [v2]

2022-04-13 Thread Valerie Peng
> This trivial change is to deprecate the DEFAULT static field of > OAEPParameterSpec class. Wordings are mostly the same as the previous > PSSParameterSpec deprecation change. Rest are just minor code re-factoring. > > The CSR will be filed once review is somewhat finished. > > Thanks, > Valer

Re: RFR: 8186958: Need method to create pre-sized HashMap [v16]

2022-04-13 Thread Stuart Marks
On Wed, 13 Apr 2022 16:29:11 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > revert changes in: > src/java.desktop > src/java.management > src/jdk

Re: JEP Review Request: TLS Certificate Compression

2022-04-13 Thread Daniel Jeliński
I like the idea of implementing certificate compression. Only one concern: TLS handshakes are generally a CPU-intensive operation, and certificate compression / decompression will only make it worse. Will it be possible to compress a certificate once and use it across multiple handshakes? Decompres

Re: RFR: 8186958: Need method to create pre-sized HashMap [v16]

2022-04-13 Thread Naoto Sato
On Wed, 13 Apr 2022 16:29:11 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > revert changes in: > src/java.desktop > src/java.management > src/jdk

Re: RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice [v2]

2022-04-13 Thread Daniel Jeliński
> During TLS handshake, hundreds of constraints are evaluated to determine > which cipher suites are usable. Most of the evaluations are performed using > `HandshakeContext#algorithmConstraints` object. By default that object > contains a `SSLAlgorithmConstraints` instance wrapping another > `S

RFR: 8284853: Fix varios 'expected' typo

2022-04-13 Thread Andrey Turbanov
Found various typos of expected: `exepected`, `exept`, `epectedly`, `expeced`, `Unexpeted`, etc. - Commit messages: - [PATCH] Fix 'expected' typo - [PATCH] Fix 'expected' typo - [PATCH] Fix 'expected' typo Changes: https://git.openjdk.java.net/jdk/pull/8231/files Webrev: https:/

Re: RFR: JDK-8284112 Minor cleanup could be done in javax.crypto

2022-04-13 Thread Mark Powers
On Wed, 13 Apr 2022 06:31:51 GMT, Bradford Wetmore wrote: >> JDK-8284112 Minor cleanup could be done in javax.crypto > > src/java.base/share/classes/javax/crypto/CipherInputStream.java line 159: > >> 157: try { >> 158: ofinish = cipher.update(ibuffer, 0, readin, obuffer, >>

Re: RFR: 8186958: Need method to create pre-sized HashMap [v16]

2022-04-13 Thread Joe Wang
On Wed, 13 Apr 2022 16:29:11 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > revert changes in: > src/java.desktop > src/java.management > src/jdk

Re: JEP Review Request: TLS Certificate Compression

2022-04-13 Thread Bernd Eckenfels
Hello, For multiple connections session- or ticket reuse would be much more efficient. In fact I think cert compression looks like the wrong solution. Having a immutable certificate download Chain would be a cool alternative solution - especially with future large postquantumcrypto certificates

Re: RFR: 8186958: Need method to create pre-sized HashMap [v16]

2022-04-13 Thread Lance Andersen
On Wed, 13 Apr 2022 16:29:11 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > revert changes in: > src/java.desktop > src/java.management > src/jdk

Re: RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice [v2]

2022-04-13 Thread Daniel Jeliński
On Wed, 13 Apr 2022 16:02:50 GMT, Xue-Lei Andrew Fan wrote: >> Thanks @XueleiFan for the review! >> If we do that, this will result in a behavior change for cases where >> `enabledX509DisabledAlgConstraints` = false; is that okay? Or should we set >> `enabledX509DisabledAlgConstraints` = true i

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

2022-04-13 Thread xueleifan(XueleiFan)
Hi Daniel, Actually, I’m considering the improvement, by using cached compressed certificates, for the implementation. The solution is not straightforward yet to me. But it is a direction I will consider seriously. Thanks, Xuelei > On Apr 13, 2022, at 1:01 PM, Daniel Jeliński wrote: > > I

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

2022-04-13 Thread xueleifan(XueleiFan)
On Apr 13, 2022, at 2:07 PM, Bernd Eckenfels mailto:[email protected]>> wrote: Hello, For multiple connections session- or ticket reuse would be much more efficient. In fact I think cert compression looks like the wrong solution. Having a immutable certificate download Chain would be a c

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

2022-04-13 Thread Valerie Peng
On Wed, 13 Apr 2022 07:01:19 GMT, Xue-Lei Andrew Fan wrote: >> How about this then? >> >> * The returned parameters may be the same that were used to >> initialize >> * this cipher, or may contain additional default and random parameter >> * values used by the underlying cipher i

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

2022-04-13 Thread Valerie Peng
> Anyone can help review this javadoc update? The main change is the wording > for the method javadoc of > Cipher.getParameters()/CipherSpi.engineGetParameters(). The original wording > is somewhat restrictive and request is to broaden this to accommodate more > scenarios such as when null can

Re: RFR: 8186958: Need method to create pre-sized HashMap [v17]

2022-04-13 Thread XenoAmess
> 8186958: Need method to create pre-sized HashMap XenoAmess has updated the pull request incrementally with one additional commit since the last revision: Copyright latest year to 2022 - Changes: - all: https://git.openjdk.java.net/jdk/pull/7928/files - new: https://git.open

Re: RFR: 8284853: Fix varios 'expected' typo

2022-04-13 Thread Brian Burkhalter
On Wed, 13 Apr 2022 20:36:48 GMT, Andrey Turbanov wrote: > Found various typos of expected: `exepected`, `exept`, `epectedly`, > `expeced`, `Unexpeted`, etc. Expect the Unexpeted. - Marked as reviewed by bpb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8231

Re: RFR: 8186958: Need method to create pre-sized HashMap [v16]

2022-04-13 Thread XenoAmess
On Wed, 13 Apr 2022 20:06:34 GMT, Naoto Sato wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> revert changes in: >> src/java.desktop >> src/java.management >> src/jdk.internal.vm.ci >> src/jdk.jfr >> src/jdk.

Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-13 Thread XenoAmess
> 8186958: Need method to create pre-sized HashMap XenoAmess has updated the pull request incrementally with one additional commit since the last revision: update LastModified - Changes: - all: https://git.openjdk.java.net/jdk/pull/7928/files - new: https://git.openjdk.java.n

Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-13 Thread Stuart Marks
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > update LastModified src/java.base/share/classes/java/lang/Character.java l

Re: RFR: 8284853: Fix varios 'expected' typo

2022-04-13 Thread Chris Plummer
On Wed, 13 Apr 2022 20:36:48 GMT, Andrey Turbanov wrote: > Found various typos of expected: `exepected`, `exept`, `epectedly`, > `expeced`, `Unexpeted`, etc. test/jdk/java/lang/StackWalker/StackStreamTest.java line 218: > 216: private static void equalsOrThrow(String label, List list, >

Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-13 Thread Naoto Sato
On Wed, 13 Apr 2022 22:40:38 GMT, Stuart Marks wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> update LastModified > > src/java.base/share/classes/java/lang/Character.java line 8574: > >> 8572: private static

Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-13 Thread Stuart Marks
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > update LastModified src/java.xml/share/classes/com/sun/org/apache/xalan/in

Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-13 Thread Stuart Marks
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > update LastModified src/java.xml/share/classes/com/sun/org/apache/xerces/i

Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-13 Thread Stuart Marks
On Wed, 13 Apr 2022 22:20:14 GMT, XenoAmess wrote: >> 8186958: Need method to create pre-sized HashMap > > XenoAmess has updated the pull request incrementally with one additional > commit since the last revision: > > update LastModified src/java.base/unix/classes/java/lang/ProcessEnvironmen

Re: RFR: 8186958: Need method to create pre-sized HashMap [v16]

2022-04-13 Thread Stuart Marks
On Wed, 13 Apr 2022 20:06:34 GMT, Naoto Sato wrote: >> XenoAmess has updated the pull request incrementally with one additional >> commit since the last revision: >> >> revert changes in: >> src/java.desktop >> src/java.management >> src/jdk.internal.vm.ci >> src/jdk.jfr >> src/jdk.

Re: RFR: 8186958: Need method to create pre-sized HashMap [v16]

2022-04-13 Thread Naoto Sato
On Wed, 13 Apr 2022 23:48:06 GMT, Stuart Marks wrote: > but I suspect the cleanup may simply be removing them entirely. +1 for removing it. - PR: https://git.openjdk.java.net/jdk/pull/7928

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

2022-04-13 Thread Mark Powers
> JDK-8284112 Minor cleanup could be done in javax.crypto Mark Powers has updated the pull request incrementally with two additional commits since the last revision: - merge stuff - review comments from Brad Wetmore - Changes: - all: https://git.openjdk.java.net/jdk/pull/8214/f

Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-13 Thread XenoAmess
On Wed, 13 Apr 2022 22:57:33 GMT, Stuart Marks wrote: > Not `_size+2` ? I don't have a idea here why he original use the + 2. Is there any guy more familiar with this code tell me why? Thanks! > I suspect the `size*2+1` was a failed attempt at allocating a HashMap of the > correct capacity for

Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-13 Thread Joe Wang
On Thu, 14 Apr 2022 01:15:05 GMT, XenoAmess wrote: >> src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/dom/DocumentCache.java >> line 171: >> >>> 169: _current = 0; >>> 170: _size = size; >>> 171: _references = HashMap.newHashMap(_size); >> >> Not `_s

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

2022-04-13 Thread Xue-Lei Andrew Fan
On Wed, 13 Apr 2022 22:04:03 GMT, Valerie Peng wrote: >> Anyone can help review this javadoc update? The main change is the wording >> for the method javadoc of >> Cipher.getParameters()/CipherSpi.engineGetParameters(). The original wording >> is somewhat restrictive and request is to broaden

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

2022-04-13 Thread Xue-Lei Andrew Fan
On Wed, 13 Apr 2022 21:53:33 GMT, Valerie Peng wrote: >> I like the revised spec more. >> >> BTW, for "... contain additional default and random parameter values ...", >> is "or" more common than "and" in English? > > Hmm, the original javadoc has "and", so I just picked it up. Perhaps I shoul

Re: RFR: 8186958: Need method to create pre-sized HashMap [v18]

2022-04-13 Thread Joe Wang
On Thu, 14 Apr 2022 01:13:18 GMT, XenoAmess wrote: >> src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSAttributeChecker.java >> line 1819: >> >>> 1817: Map items; >>> 1818: LargeContainer(int size) { >>> 1819: items = HashMap.newHashMap(size*2+1

Re: RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice [v2]

2022-04-13 Thread Xue-Lei Andrew Fan
On Wed, 13 Apr 2022 20:32:02 GMT, Daniel Jeliński wrote: >> During TLS handshake, hundreds of constraints are evaluated to determine >> which cipher suites are usable. Most of the evaluations are performed using >> `HandshakeContext#algorithmConstraints` object. By default that object >> conta

Re: RFR: 8212136: Remove BaseSSLSocketImpl finalizer method [v2]

2022-04-13 Thread Xue-Lei Andrew Fan
On Thu, 7 Apr 2022 20:17:28 GMT, Xue-Lei Andrew Fan wrote: >> Please review the update to remove finalizer method in the SunJSSE provider >> implementation. 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 increment