corretto / amazon-corretto-crypto-provider

The Amazon Corretto Crypto Provider is a collection of high-performance cryptographic implementations exposed via standard JCA/JCE interfaces.
Apache License 2.0
238 stars 56 forks source link

Only use v1.3 for TLS integ test on LTS/supported versions #252

Closed WillChilds-Klein closed 2 years ago

WillChilds-Klein commented 2 years ago

Due to legacy build constraints, we still need to be able to test and run on JDK10, even though it hasn't recieved a security patch in years and we only officially support LTS Java releases (8, 11, 17 at the moment). We first noticed this behavior when a ToD run of integration tests on JDK10 started failing consistently with the following exception, indicating that the older JDK10 w/o any of the backports enjoyed by e.g. JDK8 simply doesn't have the more modern 1.3 SSL context (and has no path to getting it, as JDK10 is EoL).

Exception in thread "main" java.security.NoSuchAlgorithmException: TLSv1.3 SSLContext not available
        at java.base/sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
        at java.base/javax.net.ssl.SSLContext.getInstance(SSLContext.java:168)
        at com.amazon.corretto.crypto.provider.test.integration.TestHTTPSServer.runServer(TestHTTPSServer.java:169)
        at com.amazon.corretto.crypto.provider.test.integration.TestHTTPSServer.main(TestHTTPSServer.java:227)

Public ACCP added TLSv1.3 integ test coverage about a year ago, but the PR's testing documentation indicates it was only tested on LTS java versions. So, instead of skipping the test entirely for 10, we simply test generic TLS instead of 1.3 specifically.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.