Re: RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v6]

2022-04-18 Thread Valerie Peng
On Sat, 16 Apr 2022 05:35:20 GMT, Xue-Lei Andrew Fan wrote: >> This is an effort to fix a problem introduced in the fix for >> [JDK-8284368](https://bugs.openjdk.java.net/browse/JDK-8284368), which >> replaced the finalizers in jdk.crypto.cryptoki with Cleaners. However, >> there is a

Re: RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v5]

2022-04-18 Thread Brent Christian
On Sat, 16 Apr 2022 05:28:39 GMT, Xue-Lei Andrew Fan wrote: >> src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.c line 274: >> >>> 272: ModuleData *moduleData = jlong_to_ptr(ckpNativeData); >>> 273: >>> 274: if (moduleData != NULL) { >> >> The check should be

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

2022-04-18 Thread Bradford Wetmore
On Fri, 15 Apr 2022 23:32:11 GMT, Mark Powers wrote: >> JDK-8284112 Minor cleanup could be done in javax.crypto > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > cleanup

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

2022-04-18 Thread Mark Powers
On Tue, 12 Apr 2022 21:59:09 GMT, Mark Powers wrote: > JDK-8284112 Minor cleanup could be done in javax.crypto This pull request has now been integrated. Changeset: 41fc0783 Author:Mark Powers Committer: Bradford Wetmore URL:

Integrated: 8186958: Need method to create pre-sized HashMap

2022-04-18 Thread XenoAmess
On Wed, 23 Mar 2022 18:41:59 GMT, XenoAmess wrote: > 8186958: Need method to create pre-sized HashMap This pull request has now been integrated. Changeset: 87faa85c Author:XenoAmess Committer: Stuart Marks URL:

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

2022-04-18 Thread Stuart Marks
On Thu, 14 Apr 2022 21:27:16 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: > > java.xml.crypto's usage downgrade grammar to 1.8 I've also written a

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

2022-04-18 Thread Stuart Marks
On Thu, 14 Apr 2022 21:27:16 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: > > java.xml.crypto's usage downgrade grammar to 1.8 Marked as reviewed by

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

2022-04-18 Thread Valerie Peng
On Tue, 19 Apr 2022 02:20:10 GMT, Valerie Peng wrote: >> src/java.base/share/classes/javax/crypto/Cipher.java line 1054: >> >>> 1052: * this cipher, or may contain additional default or random >>> parameter >>> 1053: * values used by the underlying cipher implementation if this >>>

Re: RFR: 8284933: Improve debug in jdk.crypto.cryptoki

2022-04-18 Thread Valerie Peng
On Sun, 17 Apr 2022 14:45:49 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have the simple update reviewed? > > In the jdk.crypto.cryptoki module implementation, some of the debug > information could be calculated even if the debug is not enabled, which is > not resource friendly. > >

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

2022-04-18 Thread Bradford Wetmore
On Fri, 15 Apr 2022 23:32:11 GMT, Mark Powers wrote: >> JDK-8284112 Minor cleanup could be done in javax.crypto > > Mark Powers has updated the pull request incrementally with one additional > commit since the last revision: > > cleanup This looks ok to me. Go ahead and push.

Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-18 Thread liach
On Mon, 18 Apr 2022 20:42:48 GMT, Remi Forax wrote: > The third parameter of defineProxy() is a lambda which is called for each > method that can be overriden, either toString/equals/hashCode but also any > default methods, if the lambda return true, the method is overriden, otherwise the

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

2022-04-18 Thread Valerie Peng
On Fri, 15 Apr 2022 17:30:38 GMT, Sean Mullan wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update w/ review feedbacks > > src/java.base/share/classes/javax/crypto/Cipher.java line 1054: > >> 1052: * this

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

2022-04-18 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, >

Re: RFR: 8283022: com/sun/crypto/provider/Cipher/AEAD/GCMBufferTest.java failing with -Xcomp after 8273297 [v2]

2022-04-18 Thread Anthony Scarpino
On Mon, 18 Apr 2022 20:43:06 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)

Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-18 Thread Remi Forax
- Original Message - > From: "liach" > To: "core-libs-dev" , "security-dev" > > Sent: Monday, April 18, 2022 10:01:39 PM > Subject: Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes > On Sun, 17 Apr 2022 16:17:30 GMT, liach wrote: > >> Convert dynamic proxies to hidden

Re: RFR: 8283022: com/sun/crypto/provider/Cipher/AEAD/GCMBufferTest.java failing with -Xcomp after 8273297 [v2]

2022-04-18 Thread Smita Kamath
> 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 caused the ciphertext mismatch as > PARALLEL_LEN was

RFR: 8209935: Test to cover CodeSource.getCodeSigners()

2022-04-18 Thread Sibabrata Sahoo
A Test updated to cover the getCodeSigners. - Commit messages: - Update Implies.java - 8209935: Test to cover CodeSource.getCodeSigners() Changes: https://git.openjdk.java.net/jdk/pull/8286/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=8286=00 Issue:

Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-18 Thread Alan Bateman
On 17/04/2022 17:24, liach wrote: Convert dynamic proxies to hidden classes. Modifies the serialization of proxies (requires change in "Java Object Serialization Specification"). Makes the proxies hidden in stack traces. Removes duplicate logic in proxy building. The main compatibility

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

2022-04-18 Thread Alan Bateman
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: 8284935: Improve debug in java.security.jgss

2022-04-18 Thread Sean Mullan
On Mon, 18 Apr 2022 04:40:27 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have the simple update reviewed? > > In the java.security.jgss module implementation, some of the debug > information could be generated even if debugging is not enabled, which is not > resource friendly. > >

Re: RFR: 8209935: Test to cover CodeSource.getCodeSigners() [v2]

2022-04-18 Thread Sibabrata Sahoo
On Mon, 18 Apr 2022 13:22:35 GMT, Sibabrata Sahoo wrote: >> A Test updated to cover the getCodeSigners. > > Sibabrata Sahoo has updated the pull request incrementally with one > additional commit since the last revision: > > Update Implies.java All comments addressed. - PR:

Re: RFR: 8209935: Test to cover CodeSource.getCodeSigners() [v2]

2022-04-18 Thread Sibabrata Sahoo
> A Test updated to cover the getCodeSigners. Sibabrata Sahoo has updated the pull request incrementally with one additional commit since the last revision: Update Implies.java - Changes: - all: https://git.openjdk.java.net/jdk/pull/8286/files - new:

Re: RFR: 8284926: Share the certificate NamedGroup in SignatureScheme::getSignerOfPreferableAlgorithm [v2]

2022-04-18 Thread John Jiang
> It would not to generate the certificate's ECParameterSpec and NamedGroup > multiple times in method `SignatureScheme::getSignerOfPreferableAlgorithm`. John Jiang has updated the pull request incrementally with one additional commit since the last revision: cache ParamSpec and NamedGroup

RFR: 8225433: Clarify behavior of PKIXParameters.setRevocationEnabled when PKIXRevocationChecker is used

2022-04-18 Thread Sean Mullan
This change improves the specification for the case when a `PKIXRevocationChecker` is supplied as one of the `CertPathChecker` parameters. Specifically, it makes it more clear that a `PKIXRevocationChecker` overrides the default revocation checking mechanism of a PKIX service provider, and will

Integrated: 8284935: Improve debug in java.security.jgss

2022-04-18 Thread Xue-Lei Andrew Fan
On Mon, 18 Apr 2022 04:40:27 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have the simple update reviewed? > > In the java.security.jgss module implementation, some of the debug > information could be generated even if debugging is not enabled, which is not > resource friendly. > >

Re: RFR: 8209935: Test to cover CodeSource.getCodeSigners()

2022-04-18 Thread Sean Mullan
On Mon, 18 Apr 2022 09:46:06 GMT, Sibabrata Sahoo wrote: > A Test updated to cover the getCodeSigners. test/jdk/java/security/CodeSource/Implies.java line 60: > 58: = new CodeSource(thatURL, > (java.security.cert.Certificate[]) null); > 59: if (thisCs.implies(thatCs)

Re: RFR: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-18 Thread Mandy Chung
On Sun, 17 Apr 2022 16:17:30 GMT, liach wrote: > Convert dynamic proxies to hidden classes. Modifies the serialization of > proxies (requires change in "Java Object Serialization Specification"). Makes > the proxies hidden in stack traces. Removes duplicate logic in proxy building. > > The

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

2022-04-18 Thread Sean Mullan
On Mon, 18 Apr 2022 16:39:36 GMT, Stuart Marks wrote: >> Xue-Lei Andrew Fan has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update test case > > src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java > line 123:

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

2022-04-18 Thread Sean Mullan
On Wed, 13 Apr 2022 19:27:00 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

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

2022-04-18 Thread Roger Riggs
On Mon, 18 Apr 2022 17:27:04 GMT, Sean Mullan wrote: >> src/java.base/share/classes/javax/security/auth/callback/PasswordCallback.java >> line 123: >> >>> 121: cleanable = CleanerFactory.cleaner().register( >>> 122: this, cleanerFor(inputPassword)); >>> 123:

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

2022-04-18 Thread Sean Mullan
On Mon, 18 Apr 2022 15:21:18 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-18 Thread Sean Mullan
On Mon, 18 Apr 2022 18:07:59 GMT, Roger Riggs wrote: >> I can see why that might be a good idea. Would require a specification >> change though. I also think it is fine to keep the behavior the same, and >> place the responsibility on the application to call `clearPassword` before >> setting

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

2022-04-18 Thread Xue-Lei Andrew Fan
On Mon, 18 Apr 2022 14:33:35 GMT, Roger Riggs wrote: > Please combine these closely related cases into a single test, preferably > with TestNG or JUnit. I normally prefer to have one job in one test, so that it is easier for debugging. I'm fine to combine them as the cases are simple enough.

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

2022-04-18 Thread Xue-Lei Andrew Fan
On Sat, 9 Apr 2022 15:00:46 GMT, Weijun Wang wrote: >>> You might try it on other objects: >> >> Nice idea to test object collection. I added two test cases. >> >>> The `NativeGSSContext` code still needs to be fixed. >> >> Could you have more details? I did not catch the comment about >>

Re: RFR: 8284933: Improve debug in jdk.crypto.cryptoki

2022-04-18 Thread Sean Mullan
On Sun, 17 Apr 2022 14:45:49 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have the simple update reviewed? > > In the jdk.crypto.cryptoki module implementation, some of the debug > information could be calculated even if the debug is not enabled, which is > not resource friendly. > >

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

2022-04-18 Thread Anthony Scarpino
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 [v2]

2022-04-18 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: 8283022: com/sun/crypto/provider/Cipher/AEAD/GCMBufferTest.java failing with -Xcomp after 8273297

2022-04-18 Thread Alan Bateman
On Mon, 18 Apr 2022 15:13:14 GMT, Anthony Scarpino wrote: > x86-64 only uses this intrinsic, aarch64 does not support this intrinsic and > uses the java code. It looks like aarch64 has an implementation of generate_galoisCounterMode_AESCrypt, isn't that the code that implGCMCrypt0 runs?

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

2022-04-18 Thread Stuart Marks
On Thu, 14 Apr 2022 20:16:38 GMT, Sean Mullan wrote: >>> Are the changes necessary for this part? >> >> @seanjmullan no, they are just performance refinement. >> >> If you really that wanna 100% sync , >> >> I can use the old 1.8 api to migrate that part, and make a mirror pr to that >> part

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

2022-04-18 Thread Anthony Scarpino
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 [v2]

2022-04-18 Thread Stuart Marks
On Mon, 18 Apr 2022 15:21:18 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: 8186958: Need method to create pre-sized HashMap [v21]

2022-04-18 Thread Sean Mullan
On Thu, 14 Apr 2022 20:16:38 GMT, Sean Mullan wrote: >>> Are the changes necessary for this part? >> >> @seanjmullan no, they are just performance refinement. >> >> If you really that wanna 100% sync , >> >> I can use the old 1.8 api to migrate that part, and make a mirror pr to that >> part

Re: RFR: 8284910: Buffer clean in PasswordCallback

2022-04-18 Thread Roger Riggs
On Sat, 16 Apr 2022 15:45:21 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: JDK-8242888: Convert dynamic proxy to hidden classes

2022-04-18 Thread liach
On Sun, 17 Apr 2022 16:17:30 GMT, liach wrote: > Convert dynamic proxies to hidden classes. Modifies the serialization of > proxies (requires change in "Java Object Serialization Specification"). Makes > the proxies hidden in stack traces. Removes duplicate logic in proxy building. > > The

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

2022-04-18 Thread Roger Riggs
On Mon, 18 Apr 2022 18:15:25 GMT, Sean Mullan wrote: >> setPassword can/should always clear the previous password. It is an >> internal copy that no one else has a reference to and is being replaced. >> It will need to either explicitly call cleanable.clean() or fill/erase the >> array

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

2022-04-18 Thread Stuart Marks
On Mon, 18 Apr 2022 19:10:44 GMT, Roger Riggs wrote: >> What about code that is already calling `clearPassword` between calls to >> `setPassword`? This seems to be a change in the design of this API. The >> `clearPassword` method is there to allow callers to manage and clear the >> passwords

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

2022-04-18 Thread Anthony Scarpino
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 [v2]

2022-04-18 Thread Sean Mullan
On Mon, 18 Apr 2022 19:27:21 GMT, Stuart Marks wrote: >> I think its "belt and suspenders". >> If the caller does not call `clearPassword` before calling a second >> `setPassword,` the previous char array will still contain the previous >> password and remain uncleared in memory for a (longer)