Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jdk 20 compatibility #380

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

Nezisi
Copy link

@Nezisi Nezisi commented Jul 27, 2023

ssl-config uses sun.security - which breaks in JDK 20 plus.

#367

While many of the deprecated sun.* libraries have a counterpart, the X509Certificate doesn't.

https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/security/cert/X509Certificate.html

It's an abstract class, building a certificate isn't possible (as far as I know :) ).

Given that Play Framework and other projects rely on ssl-config, the path of "minimal pain" is to use bouncy castles JCA classes to create a drop-in replacement for the Fake TLS certificate generations.

The remaining commits remove all @Deprecated methods / classes / ... and try to update the project to a releasable new version.

There is a gotcha regarding Scala support, which I cannot fix as my Scala knowledge is pretty minimal:
com/typesafe/sslconfig/ssl/Config.scala utilizes scala.language.existentials which got removed in Scala 3.
The test fails for the class, though I'm not entirely sure if the lack of existentials in Scala 3 is the problem or sth else.

I published the generated artifacts locally and the Playframework 2.9 tests ran successfully.

@lightbend-cla-validator
Copy link
Collaborator

Hi @Nezisi,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

https://www.lightbend.com/contribute/cla

@Nezisi
Copy link
Author

Nezisi commented Jul 27, 2023

Hi @lightbend-cla-validator CLA is signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants