diff options
author | André Draszik <andre.draszik@jci.com> | 2018-04-02 07:43:44 +0100 |
---|---|---|
committer | Richard Leitner <richard.leitner@skidata.com> | 2018-06-12 21:11:05 +0200 |
commit | 27e4ffb925cc60f18a4062098ed63d0826812249 (patch) | |
tree | 8f189a52328cde0ecde0cfca8c802e2aa080ffee /lib/oeqa/runtime/cases/java.py | |
parent | 9f31b5f201ee4c08fec29bd0b91b8071e30a7d49 (diff) | |
download | meta-java-27e4ffb925cc60f18a4062098ed63d0826812249.tar.gz |
ca-certificates-java: add recipe to generate trustStore
The OpenJDK-8 package currently comes with a trustStore
that was generated at OpenJDK-8-native build time from
*all* certificates available in the system, not just from
those that are marked as trusted.
This isn't right...
So this recipe hooks into the ca-certificates package and
(re-) creates the Java trustStore based on the
certificates trusted by the system, whenever they are
updated. This works both at image build time, as well as
during runtime on the target.
It works by installing a hook into ca-certificates'
$SYSROOT/etc/ca-certificates/update.d/ that is passed the
added/removed certificates as arguments. That hook is then
updating the Java trustStore and storing it in
$SYSROOT/etc/ssl/certs/java/cacerts.
The whole idea as well as the implementation of the hook
is borrowed from debian's ca-certificate-java package,
version 20170930 (the latest as of this commit).
Looking at the debian package, it appears like the same
binary trustStore ($SYSROOT/etc/ssl/certs/java/cacerts)
can be used by different versions of Java:
* OpenJDK-7, 8, 9
* Oracle Java 7, 8, 9
The Java sources here can be compiled by any compatible
Java compiler, but the resulting jar file should only be
run by one of the compatible Java versions mentioned
above, so as to create a trustStore that can be read by
any of the Java versions mentioned above. We try to ensure
this using PACKAGE_WRITE_DEPS during image build time,
and by trying to find a compatible Java version inside
${libdir_jvm} at runtime both during image build time and
on the target.
Given there is nothing that we can RDEPENDS on that would
satisfy any of the above Java versions (either JDK or JRE),
we simply RDEPENDS on java2-runtime, and test
PREFERRED_RPROVIDER_java2-runtime to be satisfactory.
Given I can only test OpenJDK/OpenJRE 8 at the moment, only
those are actually allowed at the moment, though. This can
easily be extended upon confirmation.
Final note - as per the debian package, there are three
cases when we can be called:
1) as part of update-ca-certificates -> add / remove certs as instructed
2) if first time install -> add all certs
3) package update -> do nothing
We have no way to easily distinguish between first time install
and package update in OE, so the distinction between cases 2)
and 3) isn't perfect.
Signed-off-by: André Draszik <andre.draszik@jci.com>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Diffstat (limited to 'lib/oeqa/runtime/cases/java.py')
0 files changed, 0 insertions, 0 deletions