Integrated: 8286422: Add OIDs for RC2 and Blowfish

2022-05-12 Thread Weijun Wang
On Wed, 11 May 2022 22:35:32 GMT, Weijun Wang wrote: > Add missing OIDs for 2 secret key algorithms. These will be used when storing > secret keys in a PKCS12 keystore. Like DES and DESede, the OIDs were > originally defined for CBC mode cipher algorithms, they are reused here for > key algori

Re: RFR: 8284194: Allow empty subject fields in keytool [v2]

2022-05-12 Thread Sean Mullan
On Wed, 11 May 2022 23:40:46 GMT, Weijun Wang wrote: >> This code change allows one entering "." at a distinguished name prompt to >> skip a sub-component when running `keytool -genkeyapir`. Several new >> resource strings are added. >> >> There is no detailed description in `keytool.html`, so

Re: RFR: 8284194: Allow empty subject fields in keytool [v2]

2022-05-12 Thread Weijun Wang
On Wed, 11 May 2022 23:40:46 GMT, Weijun Wang wrote: >> This code change allows one entering "." at a distinguished name prompt to >> skip a sub-component when running `keytool -genkeyapir`. Several new >> resource strings are added. >> >> There is no detailed description in `keytool.html`, so

Integrated: 8286423: Destroy password protection in the example code in KeyStore

2022-05-12 Thread Xue-Lei Andrew Fan
On Tue, 10 May 2022 04:13:43 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this simple example update in the KeyStore specification? > > Password protection should be destroyed in the example code in KeyStore > specification. Otherwise, applications may just copy and past the code, and

Re: RFR: 8284194: Allow empty subject fields in keytool [v2]

2022-05-12 Thread Sean Mullan
On Thu, 12 May 2022 13:48:46 GMT, Weijun Wang wrote: > I've already modified the prompt a little before the CSR is finalized. How > about > > ``` > Enter the distinguished name. Provider a single dot (.) to leave a > sub-component empty or press ENTER to use the default value in braces. > ```

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-12 Thread Weijun Wang
On Thu, 10 Mar 2022 08:52:17 GMT, Сергей Цыпанов wrote: >> `List.of()` along with `Set.of()` create unmodifiable `List/Set` but with >> smaller footprint comparing to `Arrays.asList()` / `new HashSet()` when >> called with vararg of size 0, 1, 2. >> >> In general replacement of `Arrays.asList(

Re: RFR: 8284194: Allow empty subject fields in keytool [v3]

2022-05-12 Thread Weijun Wang
> This code change allows one entering "." at a distinguished name prompt to > skip a sub-component when running `keytool -genkeyapir`. Several new resource > strings are added. > > There is no detailed description in `keytool.html`, so I think there's no > need to update it. > > I'll file a C

Re: RFR: 8002277: Refactor two PBE classes to simplify maintenance [v7]

2022-05-12 Thread Weijun Wang
On Thu, 12 May 2022 03:28:15 GMT, Valerie Peng wrote: >> This change refactors the PBES2Core and PKCS12PBECipherCore classes in >> SunJCE provider as requested in the bug record. Functionality should remain >> the same with a clearer and simplified code/control flow with less lines of >> code.

Integrated: 8286378: Address possibly lossy conversions in java.base

2022-05-12 Thread Roger Riggs
On Tue, 10 May 2022 21:32:10 GMT, Roger Riggs wrote: > PR#8599 8244681: proposes to add compiler warnings for possible lossy > conversions > From the CSR: > > "If the type of the right-hand operand of a compound assignment is not > assignment compatible with the type of the variable, a cast is

RFR: 8286393: Address possibly lossy conversions in java.rmi

2022-05-12 Thread Roger Riggs
Updates to modules java.rmi and java.smartcardio to remove warnings about lossy-conversions introduced by PR#8599. Explicit casts are inserted where implicit casts occur. 8286393: Address possibly lossy conversions in java.rmi 8286388: Address possibly lossy conversions in java.smartcardio

Re: RFR: 8286393: Address possibly lossy conversions in java.rmi

2022-05-12 Thread Lance Andersen
On Thu, 12 May 2022 16:47:43 GMT, Roger Riggs wrote: > Updates to modules java.rmi and java.smartcardio to remove warnings about > lossy-conversions introduced by PR#8599. > > Explicit casts are inserted where implicit casts occur. > > 8286393: Address possibly lossy conversions in java.rmi >

Re: RFR: 8286393: Address possibly lossy conversions in java.rmi

2022-05-12 Thread Daniel Fuchs
On Thu, 12 May 2022 16:47:43 GMT, Roger Riggs wrote: > Updates to modules java.rmi and java.smartcardio to remove warnings about > lossy-conversions introduced by PR#8599. > > Explicit casts are inserted where implicit casts occur. > > 8286393: Address possibly lossy conversions in java.rmi >

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-12 Thread Sean Mullan
On Wed, 11 May 2022 22:12:48 GMT, Valerie Peng wrote: >> src/java.base/share/classes/java/security/SignatureSpi.java line 399: >> >>> 397: * values used by the underlying signature scheme. If the required >>> 398: * parameters were not supplied and can be generated by the >>> signatur

Re: RFR: 8002277: Refactor two PBE classes to simplify maintenance [v7]

2022-05-12 Thread Sean Mullan
On Thu, 12 May 2022 03:28:15 GMT, Valerie Peng wrote: >> This change refactors the PBES2Core and PKCS12PBECipherCore classes in >> SunJCE provider as requested in the bug record. Functionality should remain >> the same with a clearer and simplified code/control flow with less lines of >> code.

Re: RFR: 8253176: Signature.getParameters should specify that it can throw UnsupportedOperationException [v4]

2022-05-12 Thread Valerie Peng
On Thu, 12 May 2022 18:23:18 GMT, Sean Mullan wrote: >> Fixed the nit. Thanks~ >> As for the part about returning the parameters as `{@code >> AlgorithmParameters}`, it should be covered by current sentence, i.e. `and >> can be generated by the signature`. Perhaps we don't have to spell out all

Re: RFR: 8002277: Refactor two PBE classes to simplify maintenance [v7]

2022-05-12 Thread Valerie Peng
On Thu, 12 May 2022 19:27:20 GMT, Sean Mullan wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> trivial syntax fix. > > src/java.base/share/classes/com/sun/crypto/provider/PBES2Core.java line 184: > >> 182:

Re: RFR: 8002277: Refactor two PBE classes to simplify maintenance [v7]

2022-05-12 Thread Weijun Wang
On Thu, 12 May 2022 03:28:15 GMT, Valerie Peng wrote: >> This change refactors the PBES2Core and PKCS12PBECipherCore classes in >> SunJCE provider as requested in the bug record. Functionality should remain >> the same with a clearer and simplified code/control flow with less lines of >> code.

Re: RFR: 8283577: SSLEngine.unwrap on read-only input ByteBuffer

2022-05-12 Thread Bradford Wetmore
On Wed, 11 May 2022 22:25:43 GMT, Anthony Scarpino wrote: >> test/jdk/javax/net/ssl/SSLSession/ReadOnlyEngine.java line 1: >> >>> 1: /* >> >> Wondering why this is in javax/net/ssl/SSLSession instead of >> sun/security/ssl/SSLCipher. > > I can move it.. I created it from another test which ha

Re: RFR: 8002277: Refactor two PBE classes to simplify maintenance [v7]

2022-05-12 Thread Valerie Peng
On Thu, 12 May 2022 20:53:00 GMT, Weijun Wang wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> trivial syntax fix. > > src/java.base/share/classes/com/sun/crypto/provider/PBES2Core.java line 244: > >> 242:

Re: RFR: 8283577: SSLEngine.unwrap on read-only input ByteBuffer

2022-05-12 Thread Bradford Wetmore
On Wed, 11 May 2022 23:03:27 GMT, Anthony Scarpino wrote: >> test/jdk/javax/net/ssl/SSLSession/ReadOnlyEngine.java line 172: >> >>> 170: out.clear(); >>> 171: String testString = "ASDF"; >>> 172: in.put(testString.getBytes()).flip(); >> >> If you're going to convert bac

Re: RFR: 8283577: SSLEngine.unwrap on read-only input ByteBuffer

2022-05-12 Thread Bradford Wetmore
On Wed, 11 May 2022 22:38:04 GMT, Anthony Scarpino wrote: >> test/jdk/javax/net/ssl/SSLSession/ReadOnlyEngine.java line 162: >> >>> 160: statusServer != HandshakeStatus.NOT_HANDSHAKING); >>> 161: >>> 162: // Read NST >> >> What is NST? > > New Session Ticket Duh, of cours

Re: RFR: 8002277: Refactor two PBE classes to simplify maintenance [v7]

2022-05-12 Thread Weijun Wang
On Thu, 12 May 2022 21:31:39 GMT, Valerie Peng wrote: >> src/java.base/share/classes/com/sun/crypto/provider/PBES2Core.java line 244: >> >>> 242: iCount = DEFAULT_COUNT; >>> 243: } >>> 244: //if (ivSpec == null) { // old behavior always generat

Re: RFR: 8002277: Refactor two PBE classes to simplify maintenance [v8]

2022-05-12 Thread Valerie Peng
> This change refactors the PBES2Core and PKCS12PBECipherCore classes in SunJCE > provider as requested in the bug record. Functionality should remain the same > with a clearer and simplified code/control flow with less lines of code. > This should improve readability and maintenance. I enhance

Re: RFR: 8286393: Address possibly lossy conversions in java.rmi

2022-05-12 Thread Stuart Marks
On Thu, 12 May 2022 16:47:43 GMT, Roger Riggs wrote: > Updates to modules java.rmi and java.smartcardio to remove warnings about > lossy-conversions introduced by PR#8599. > > Explicit casts are inserted where implicit casts occur. > > 8286393: Address possibly lossy conversions in java.rmi >

Re: RFR: 8286393: Address possibly lossy conversions in java.rmi

2022-05-12 Thread Stuart Marks
On Thu, 12 May 2022 16:47:43 GMT, Roger Riggs wrote: > Updates to modules java.rmi and java.smartcardio to remove warnings about > lossy-conversions introduced by PR#8599. > > Explicit casts are inserted where implicit casts occur. > > 8286393: Address possibly lossy conversions in java.rmi >

Re: RFR: 8286378: Address possibly lossy conversions in java.base [v3]

2022-05-12 Thread ExE Boss
On Wed, 11 May 2022 16:30:41 GMT, Roger Riggs wrote: >> PR#8599 8244681: proposes to add compiler warnings for possible lossy >> conversions >> From the CSR: >> >> "If the type of the right-hand operand of a compound assignment is not >> assignment compatible with the type of the variable, a c

Re: RFR: 8286378: Address possibly lossy conversions in java.base [v3]

2022-05-12 Thread Alan Bateman
On Fri, 13 May 2022 04:41:03 GMT, ExE Boss wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated copyrights >> Fixed cast style to add a space after cast, (where consistent with file >> style) >> Improved cod

Re: RFR: 8282662: Use List.of() factory method to reduce memory consumption [v3]

2022-05-12 Thread Сергей Цыпанов
On Thu, 12 May 2022 14:14:38 GMT, Weijun Wang wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8282662: Revert dubious changes in MethodType > > src/java.base/share/classes/sun/security/validator/EndEntityChecker.