On 23/01/2026 13:38, Rainer Jung wrote:
About 50% of the tests for the test case

testNoResponderWithoutSoftFail[JSSE with OpenSSL trust false]

fail for Java 8. It seems none for vendor Oracle, but a bit more than 50% for Adopt, Zulu, Amazon and RedHat. Be it NIO or NIOD2, always JSSE. I use OpenSSL 3.6.0 for the OCSP responder.

I've expanded the exception types that can be thrown while still allowing the test to pass. I think we are just seeing differences between some very old Java versions.

Mark


The test case takes about 3.5 seconds (all other test cases run well below 1 second) and if it fails it is:

Testcase: testNoResponderWithoutSoftFail[JSSE with OpenSSL trust false] took 3.539 sec
         Caused an ERROR
Unexpected exception, expected<javax.net.ssl.SSLHandshakeException> but was<javax.net.ssl.SSLException> java.lang.Exception: Unexpected exception, expected<javax.net.ssl.SSLHandshakeException> but was<javax.net.ssl.SSLException>
Caused by: javax.net.ssl.SSLException: readHandshakeRecord
        at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1344)         at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:444)         at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:415)         at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:567)
         at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:702)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1616)         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1521)         at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:352)         at org.apache.catalina.startup.TomcatBaseTest.methodUrl(TomcatBaseTest.java:716)         at org.apache.catalina.startup.TomcatBaseTest.getUrl(TomcatBaseTest.java:667)         at org.apache.tomcat.util.net.ocsp.OcspBaseTest.doTest(OcspBaseTest.java:173)         at org.apache.tomcat.util.net.ocsp.TestOcspSoftFail.testNoResponderWithoutSoftFail(TestOcspSoftFail.java:49)
         Suppressed: java.net.SocketException: Broken pipe (Write failed)
                 at java.net.SocketOutputStream.socketWrite0(Native Method)
                at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)                 at java.net.SocketOutputStream.write(SocketOutputStream.java:155)                 at sun.security.ssl.SSLSocketOutputRecord.encodeAlert(SSLSocketOutputRecord.java:81)                 at sun.security.ssl.TransportContext.fatal(TransportContext.java:386)                 at sun.security.ssl.TransportContext.fatal(TransportContext.java:298)                 at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:454)
Caused by: java.net.SocketException: Broken pipe (Write failed)
         at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:111)
         at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
        at sun.security.ssl.SSLSocketOutputRecord.flush(SSLSocketOutputRecord.java:251)         at sun.security.ssl.HandshakeOutStream.flush(HandshakeOutStream.java:89)         at sun.security.ssl.Finished$T13FinishedProducer.onProduceFinished(Finished.java:663)         at sun.security.ssl.Finished$T13FinishedProducer.produce(Finished.java:642)
         at sun.security.ssl.SSLHandshake.produce(SSLHandshake.java:421)
        at sun.security.ssl.Finished$T13FinishedConsumer.onConsumeFinished(Finished.java:1003)         at sun.security.ssl.Finished$T13FinishedConsumer.consume(Finished.java:858)
         at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:377)
        at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:444)         at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:422)         at sun.security.ssl.TransportContext.dispatch(TransportContext.java:182)
         at sun.security.ssl.SSLTransport.decode(SSLTransport.java:156)
         at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1427)
        at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1333)

Regards,

Rainer








---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to