nixpkgs/pkgs/development/compilers/openjdk
Rickard Nilsson 95fdc8cf29 openjdk: Introduce JAVAX_NET_SSL_TRUSTSTORE env
This small patch makes it possible to control java's truststore path through
the environment. This lets you add (system- or session-wide) CAs that should
be allowed by Java. Java users can still use -Djavax.net.ssl.truststore to
override the truststore set by JAVAX_NET_SSL_TRUSTSTORE.

Something like this can be used to build the truststore (in this example just
using the standard pkgs.cacert CA-bundle):

{
  environment.variables.JAVAX_NET_SSL_TRUSTSTORE = "${
    pkgs.runCommand "cacerts" {} ''
      ${pkgs.perl}/bin/perl \
        ${pkgs.path}/pkgs/development/compilers/openjdk/generate-cacerts.pl \
        ${pkgs.jre}/bin/keytool \
        ${pkgs.cacert}/etc/ca-bundle.crt
      mv cacerts $out
    ''
  }";
}

Ideally, the dependency on pkgs.cacert should also be removed from pkgs.openjdk
to avoid rebuilding java each time the standard CA-bundle changes. Something
along the example above must then be added to NixOS (however, it would be
nice to not depend on ${pkgs.jre}/bin/keytool to generate that environment
variable).
2014-12-12 01:14:09 +01:00
..
bootstrap.nix openjdkBootstrap: Add support for grsecurity 2014-05-15 13:25:49 +02:00
cppflags-include-fix.patch openjdk: Update to 7u6b24 2013-01-22 12:58:07 -05:00
default.nix openjdk: Introduce JAVAX_NET_SSL_TRUSTSTORE env 2014-12-12 01:14:09 +01:00
fix-java-home.patch openjdk: Hackery to ensure that tools.jar is found 2014-01-25 03:04:46 +01:00
generate-cacerts.pl openjdk: Create a cacerts file from pkgs.cacerts 2012-10-25 23:33:09 -04:00
make-bootstrap.nix openjdk: passthru the architecture attribute like oracle jdk6 does. 2012-08-27 12:41:13 -04:00
paxctl.patch openjdk: Add support for grsecurity 2014-05-15 13:25:49 +02:00
read-truststore-from-env.patch openjdk: Introduce JAVAX_NET_SSL_TRUSTSTORE env 2014-12-12 01:14:09 +01:00