RFR: 8294985: SSLEngine throws IAE during parsing of X500Principal [v25]
Daniel Jeliński
djelinski at openjdk.org
Wed May 31 05:28:10 UTC 2023
On Tue, 30 May 2023 19:24:09 GMT, Kevin Driver <kdriver at openjdk.org> wrote:
>> Fixes: [JDK-8294985](https://bugs.openjdk.org/browse/JDK-8294985)
>
> Kevin Driver has updated the pull request incrementally with two additional commits since the last revision:
>
> - undo import changes
> - undo import changes
test/jdk/sun/security/ssl/SSLEngineImpl/TestBadDNForPeerCA.java line 29:
> 27: * @library /test/lib
> 28: * @summary SSLEngine throws IAE during parsing of X500Principal
> 29: * @run main/othervm TestBadDNForPeerCA
Suggestion:
* @run main/othervm TestBadDNForPeerCA
* @run main/othervm -Djavax.net.debug=all TestBadDNForPeerCA
and then remove the `debug` field.
test/jdk/sun/security/ssl/SSLEngineImpl/TestBadDNForPeerCA.java line 55:
> 53: private SSLEngine serverEngine; // server Engine
> 54: private ByteBuffer serverIn; // read side of serverEngine
> 55: private ByteBuffer clientOut; // read side of serverEngine
Not used
test/jdk/sun/security/ssl/SSLEngineImpl/TestBadDNForPeerCA.java line 140:
> 138: System.out.println("injecting client hello");
> 139:
> 140: for (int i = 0; i < 10; i++) { //retry if survived
Is this loop really needed?
test/jdk/sun/security/ssl/SSLEngineImpl/TestBadDNForPeerCA.java line 160:
> 158: serverIn = ByteBuffer.allocateDirect(65536);
> 159:
> 160: cTOs = ByteBuffer.allocateDirect(65536);
not used - you immediately overwrite this value in runTest
test/jdk/sun/security/ssl/SSLEngineImpl/TestBadDNForPeerCA12.java line 29:
> 27: * @library /test/lib
> 28: * @summary SSLEngine throws IAE during parsing of X500Principal
> 29: * @run main/othervm TestBadDNForPeerCA12
Suggestion:
* @run main/othervm TestBadDNForPeerCA12
* @run main/othervm -Djavax.net.debug=all TestBadDNForPeerCA12
and then remove the debug field.
test/jdk/sun/security/ssl/SSLEngineImpl/TestBadDNForPeerCA12.java line 182:
> 180: clientOut = ByteBuffer.wrap("Hi Server, I'm Client".getBytes());
> 181:
> 182: sTOc = ByteBuffer.allocateDirect(65536);
not used - you immediately overwrite this value in runTest
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13466#discussion_r1211096065
PR Review Comment: https://git.openjdk.org/jdk/pull/13466#discussion_r1211098585
PR Review Comment: https://git.openjdk.org/jdk/pull/13466#discussion_r1211100260
PR Review Comment: https://git.openjdk.org/jdk/pull/13466#discussion_r1211099134
PR Review Comment: https://git.openjdk.org/jdk/pull/13466#discussion_r1211097088
PR Review Comment: https://git.openjdk.org/jdk/pull/13466#discussion_r1211101845
More information about the security-dev
mailing list