Merge pull request #5282 from rickynils/java-truststore-env
openjdk: Read SSL truststore from JAVAX_NET_SSL_TRUSTSTORE
This commit is contained in:
commit
46b0c68ea2
2 changed files with 27 additions and 1 deletions
|
@ -61,7 +61,12 @@ stdenv.mkDerivation rec {
|
|||
makeFlagsArray+=(CUPS_HEADERS_PATH=$cupsDir)
|
||||
'';
|
||||
|
||||
patches = [ ./cppflags-include-fix.patch ./fix-java-home.patch ./paxctl.patch ];
|
||||
patches = [
|
||||
./cppflags-include-fix.patch
|
||||
./fix-java-home.patch
|
||||
./paxctl.patch
|
||||
./read-truststore-from-env.patch
|
||||
];
|
||||
|
||||
NIX_NO_SELF_RPATH = true;
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
diff -ur openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
|
||||
--- openjdk-7u65-b32/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-07-17 12:12:14.000000000 +0200
|
||||
+++ openjdk-7u65-b32.new/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java 2014-12-09 13:31:27.821960372 +0100
|
||||
@@ -158,6 +158,7 @@
|
||||
/*
|
||||
* Try:
|
||||
* javax.net.ssl.trustStore (if this variable exists, stop)
|
||||
+ * system environment variable JAVAX_NET_SSL_TRUSTSTORE
|
||||
* jssecacerts
|
||||
* cacerts
|
||||
*
|
||||
@@ -165,6 +166,9 @@
|
||||
*/
|
||||
|
||||
storeFileName = props.get("trustStore");
|
||||
+ if (storeFileName == null) {
|
||||
+ storeFileName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE");
|
||||
+ }
|
||||
if (!"NONE".equals(storeFileName)) {
|
||||
if (storeFileName != null) {
|
||||
storeFile = new File(storeFileName);
|
Loading…
Reference in a new issue