-
Bug
-
Resolution: Done
-
Major
-
None
-
None
There are test failures when compiling with JDK17 at the moment. Reason for this is that a deprecated method getPeerCertificateChain() is used which leads to following test error types with my OpenJDK17 flavour:
javax.net.ssl.SSLPeerUnverifiedException: Could not find class: java.lang.ClassNotFoundException: com/sun/security/cert/internal/x509/X509V1CertImpl
java.lang.UnsupportedOperationException: This method is deprecated and marked for removal. Use the getPeerCertificates() method instead.
Simple replace of getPeerCertificateChain() with getPeerCertificates() should work.
More detailed test failures output:
[ERROR] Tests run: 18, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.619 s <<< FAILURE! - in org.wildfly.openssl.BasicOpenSSLEngineTest [ERROR] testTwoWay(org.wildfly.openssl.BasicOpenSSLEngineTest) Time elapsed: 0.018 s <<< ERROR! javax.net.ssl.SSLPeerUnverifiedException: Could not find class: java.lang.ClassNotFoundException: com/sun/security/cert/internal/x509/X509V1CertImpl at org.wildfly.openssl.OpenSSlSession.getPeerCertificateChain(OpenSSlSession.java:191) at org.wildfly.openssl.BasicOpenSSLEngineTest.performTestTwoWay(BasicOpenSSLEngineTest.java:400) at org.wildfly.openssl.BasicOpenSSLEngineTest.testTwoWay(BasicOpenSSLEngineTest.java:345) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) ... [ERROR] testTwoWayTLS13(org.wildfly.openssl.BasicOpenSSLEngineTest) Time elapsed: 0.012 s <<< ERROR! javax.net.ssl.SSLPeerUnverifiedException: Could not find class: java.lang.ClassNotFoundException: com/sun/security/cert/internal/x509/X509V1CertImpl at org.wildfly.openssl.OpenSSlSession.getPeerCertificateChain(OpenSSlSession.java:191) at org.wildfly.openssl.BasicOpenSSLEngineTest.performTestTwoWay(BasicOpenSSLEngineTest.java:400) at org.wildfly.openssl.BasicOpenSSLEngineTest.testTwoWayTLS13(BasicOpenSSLEngineTest.java:351) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) ... [ERROR] testTwoWayInterop(org.wildfly.openssl.BasicOpenSSLEngineTest) Time elapsed: 0.023 s <<< ERROR! java.lang.UnsupportedOperationException: This method is deprecated and marked for removal. Use the getPeerCertificates() method instead. at java.base/javax.net.ssl.SSLSession.getPeerCertificateChain(SSLSession.java:295) at org.wildfly.openssl.BasicOpenSSLEngineTest.performTestTwoWay(BasicOpenSSLEngineTest.java:400) at org.wildfly.openssl.BasicOpenSSLEngineTest.testTwoWayInterop(BasicOpenSSLEngineTest.java:356) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) ... [ERROR] testTwoWayInteropTLS13(org.wildfly.openssl.BasicOpenSSLEngineTest) Time elapsed: 0.023 s <<< ERROR! java.lang.UnsupportedOperationException: This method is deprecated and marked for removal. Use the getPeerCertificates() method instead. at java.base/javax.net.ssl.SSLSession.getPeerCertificateChain(SSLSession.java:295) at org.wildfly.openssl.BasicOpenSSLEngineTest.performTestTwoWay(BasicOpenSSLEngineTest.java:400) at org.wildfly.openssl.BasicOpenSSLEngineTest.testTwoWayInteropTLS13(BasicOpenSSLEngineTest.java:363) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) ... [INFO] Running org.wildfly.openssl.ClientCertTest [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.265 s - in org.wildfly.openssl.ClientCertTest [INFO] Running org.wildfly.openssl.ClientSessionInteropTest [INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.809 s - in org.wildfly.openssl.ClientSessionInteropTest [INFO] Running org.wildfly.openssl.BasicOpenSSLEngineLegacyProtocolsTest [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.29 s - in org.wildfly.openssl.BasicOpenSSLEngineLegacyProtocolsTest [INFO] [INFO] Results: [INFO] [ERROR] Errors: [ERROR] BasicOpenSSLEngineTest.testTwoWay:345->performTestTwoWay:400 » SSLPeerUnverified [ERROR] BasicOpenSSLEngineTest.testTwoWayInterop:356->performTestTwoWay:400 » UnsupportedOperation [ERROR] BasicOpenSSLEngineTest.testTwoWayInteropTLS13:363->performTestTwoWay:400 » UnsupportedOperation [ERROR] BasicOpenSSLEngineTest.testTwoWayTLS13:351->performTestTwoWay:400 » SSLPeerUnverified [INFO] [ERROR] Tests run: 55, Failures: 0, Errors: 4, Skipped: 2 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for wildfly-openssl-parent 2.1.5.CR1-SNAPSHOT: [INFO] [INFO] wildfly-openssl-parent ............................. SUCCESS [ 0.898 s] [INFO] wildfly-openssl-java ............................... FAILURE [ 20.107 s] [INFO] wildfly-openssl .................................... SKIPPED
JDK info
openjdk 17 2021-09-14
OpenJDK Runtime Environment (build 17+35-2724)
OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)