Skip to content

Conversation

@JakubVanek
Copy link
Contributor

Related to ev3dev-lang-java/ev3dev-lang-java#728 (comment)
Inspired by adoptium/adoptium-support#13 (comment)

This removes the use of the CA certificates bundled in the AdoptOpenJDK repository. Instead the CA certificates are generated before each build from the Mozilla's trust database.

This should ensure the most browser-like experience which I'd expect users to expect.

Related to ev3dev-lang-java/ev3dev-lang-java#728 (comment)

This removes the use of the CA certificates bundled
in the AdoptOpenJDK repository. Instead the CA certificates
are generated before each build from the Mozilla's trust database.

This should ensure the most browser-like experience
which I'd expect users to expect.

Inspired by adoptium/adoptium-support#13 (comment)
@jabrena
Copy link
Member

jabrena commented May 25, 2020

This change require analysis, I am not saying that the solution is not valid, the point is:

  • Why not use cacerts from Java?

@JakubVanek
Copy link
Contributor Author

Please see adoptium/adoptium-support#13

@JakubVanek
Copy link
Contributor Author

@jabrena Actually, the cacerts that were used until now were from the Mozilla's list. The debian package ca-certificates-java that was used until recently generates the cacerts file from the system trust store and on Debian this is derived from the Mozilla's one.

@jabrena
Copy link
Member

jabrena commented May 25, 2020

Oki oki, give me the opportunity to read the links, tomorrow, I will approve it.

@jabrena
Copy link
Member

jabrena commented May 25, 2020

Note: Good engineering research :)

@JakubVanek
Copy link
Contributor Author

@jabrena Actually, the cacerts that were used until now were from the Mozilla's list. The debian package ca-certificates-java that was used until recently generates the cacerts file from the system trust store and on Debian this is derived from the Mozilla's one.

I have realized this is not true actually. The cacerts in JRI come from Mozilla, but the system trust store is currently getting corrupted. The JDK cacerts come from the AdoptOpenJDK/openjdk-build repository (however their builds may not be using it, using the upstream cacerts instead). This PR would move these to up-to-date Mozilla certs. We can also go pure upstream OpenJDK, although it does have its limitations. However in the future that might be the best option if OpenJDK itself decides to inherit from Mozilla's trust store.

@JakubVanek
Copy link
Contributor Author

Another self-correction: what we refer to as JRI here is actually the Java debian package, while JDK is the tarball that can be downloaded from Jenkins. JRI in tar.gz from Jenkins is self-contained as the JDK is.

@JakubVanek
Copy link
Contributor Author

Continuing in ev3dev-lang-java/ev3dev-lang-java#731

@jabrena
Copy link
Member

jabrena commented May 26, 2020

Maybe, the certificates could come from OpenSSL:
https://github.com/paketo-buildpacks/libjvm/blob/master/cmd/openssl-certificate-loader/main.go

flagSet.StringVar(&c.CACertificatesPath, "ca-certificates", "", "path to OpenSSL CA Certificates file")

@JakubVanek
Copy link
Contributor Author

Maybe, the certificates could come from OpenSSL:
https://github.com/paketo-buildpacks/libjvm/blob/master/cmd/openssl-certificate-loader/main.go

flagSet.StringVar(&c.CACertificatesPath, "ca-certificates", "", "path to OpenSSL CA Certificates file")

OpenSSL by itself does not have a trust store (https://stackoverflow.com/a/25169323). However, it does have a container format and I think this is what is the ca-bundle.crt file that is generated by mk-ca-bundle.pl.

@jabrena
Copy link
Member

jabrena commented May 27, 2020

This evening, I will contact you to talk. The three PR are related.

@JakubVanek
Copy link
Contributor Author

I'd rather want to discuss it here on GitHub. If wanted, I can create a separate issue for the analysis where the discussion would be concentrated so that it is not split between many issues and PRs. I have mostly tried to concentrate new discussion in ev3dev-lang-java/ev3dev-lang-java#731 which is related.

@jabrena
Copy link
Member

jabrena commented May 27, 2020

Oki, we will discuss the alternatives in the issue:
ev3dev-lang-java/ev3dev-lang-java#731

@JakubVanek JakubVanek closed this May 28, 2020
@JakubVanek JakubVanek deleted the feature/ssl-certs-from-mozilla branch May 28, 2020 20:08
@JakubVanek JakubVanek restored the feature/ssl-certs-from-mozilla branch August 24, 2020 09:11
@JakubVanek
Copy link
Contributor Author

reopening

@JakubVanek JakubVanek reopened this Aug 24, 2020
@jabrena
Copy link
Member

jabrena commented Aug 24, 2020

Sorry, I am going to close this PR. Open a PR onlye with the changes required for the packaging.
Nothing more.

@JakubVanek JakubVanek deleted the feature/ssl-certs-from-mozilla branch November 28, 2020 15:49
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