phax / phase4

phase4 - AS4 client and server for integration into existing systems. Specific support for Peppol and CEF eDelivery built-in.
Apache License 2.0
154 stars 47 forks source link

Addition of TLSv1.3 in Phase4PeppolHttpClientSettings breaks receiving messages #80

Closed Florianisme closed 2 years ago

Florianisme commented 2 years ago

When upgrading from 1.3.2 to 1.3.7, receiving messages breaks with a NoSuchProviderException:

java.security.NoSuchProviderException: no such provider: TLSv1.3
    at java.base/sun.security.jca.GetInstance.getService(GetInstance.java:83)
    at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
    at java.base/javax.net.ssl.SSLContext.getInstance(SSLContext.java:213)
    at com.helger.phase4.peppol.Phase4PeppolHttpClientSettings.<init>(Phase4PeppolHttpClientSettings.java:46)

I think the method usage of SSLContext.getInstance() is incorrect as the second argument is actually the provider and not an alternative or whatever the intended usage was.

My JDK is:

openjdk 11.0.15 2022-04-19
OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)
phax commented 2 years ago

I am creating a 1.3.8 version - sorry for the inconvenience. This was introduced from 1.3.6 to 1.3.7, so 1.3.6 works.