lightbend / ssl-config

SSL configuration logic, extracted from Play's WS (for use in Akka et al).
https://lightbend.github.io/ssl-config/
Other
67 stars 39 forks source link

Enable build on JDK 15 #269

Closed wsargent closed 4 years ago

wsargent commented 4 years ago

Fixes https://github.com/lightbend/ssl-config/issues/268

Use AlgorithmId.get("") instead of using the OID directly, as JDK 15 removes methods and there is not a common interface fir it.

SethTisue commented 4 years ago

in the community build, I see that this will require adjustment in the playframework repo, downstream:

[playframework] [error] /home/jenkins/workspace/scala-2.12.x-jdk8-integrate-community-build/target-0.9.16/project-builds/playframework-f46785f3a51c80d4304d98e6eb9f8a05acc40061/transport/server/play-server/src/main/scala/play/core/server/ssl/FakeKeyStore.scala:26:89: value SignatureAlgorithmOID is not a member of object com.typesafe.sslconfig.ssl.FakeKeyStore.KeystoreSettings
[playframework] [error]   val SignatureAlgorithmOID: ObjectIdentifier = sslconfig.FakeKeyStore.KeystoreSettings.SignatureAlgorithmOID
[playframework] [error]                                                                                         ^
[playframework] [error] one error found
[playframework] [error] (Play-Server / Compile / compileIncremental) Compilation failed

or, can the change be made in a source-compatible way?

wsargent commented 4 years ago

@SethTisue I don't think so but FakeKeyStore.scala is not a core part of the API, it's for generating SSL certificates for dev servers for HTTPS

wsargent commented 4 years ago

The big problem is that there's no compatible overlap for the ObjectIdentifier between JDK 8 and JDK 15...

SethTisue commented 4 years ago

@raboof @ignasi35 who can review this...?

ignasi35 commented 4 years ago

in the community build, I see that this will require adjustment in the playframework repo, downstream:

[playframework] [error] /home/jenkins/workspace/scala-2.12.x-jdk8-integrate-community-build/target-0.9.16/project-builds/playframework-f46785f3a51c80d4304d98e6eb9f8a05acc40061/transport/server/play-server/src/main/scala/play/core/server/ssl/FakeKeyStore.scala:26:89: value SignatureAlgorithmOID is not a member of object com.typesafe.sslconfig.ssl.FakeKeyStore.KeystoreSettings
...

The class triggering the compilation error was deprecated in Play 2.7.0 offering the implementation in ssl-config instead. We should just remove the deprecated class from Play's master already.

Regarding this PR: I like the change.

ignasi35 commented 4 years ago

We should just remove the deprecated class from Play's master already.

https://github.com/playframework/playframework/pull/10487

ignasi35 commented 4 years ago

Thansk @wsargent

raboof commented 4 years ago

I'll exclude the mima warnings

ignasi35 commented 4 years ago

thanks @raboof!

mkurz commented 3 years ago

Could some release ssl-config 0.4.3 with this patch here? I try to make Play Java 16/17 compatible and this here is needed to make that work. There are no other changes yet in master, so I think cutting 0.4.3 should be OK: https://github.com/lightbend/ssl-config/compare/v0.4.2...master

raboof commented 3 years ago

will do

mkurz commented 3 years ago

@raboof Thanks!

raboof commented 3 years ago

(ran into some problems with the script/setup but I think it should be on its way to Maven Central now)

mkurz commented 3 years ago

@raboof Thanks! Watching https://repo1.maven.org/maven2/com/typesafe/ssl-config-core_2.13/

mkurz commented 3 years ago

@raboof Can you please quickly review https://github.com/playframework/playframework/pull/10729 ? should be OK to merge, tests for it are currently running and look good: https://travis-ci.com/github/playframework/playframework/builds/220915269

mkurz commented 3 years ago

@raboof still not on central... Is there a problem?

raboof commented 3 years ago

Oops, apparently it was not auto-closed... not sure why I thought it was. closing & releasing...