nixpkgs/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk10.patch
2018-03-25 00:49:26 -04:00

20 lines
955 B
Diff

--- a/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java 2017-06-26 21:48:25.000000000 -0400
+++ b/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java 2017-07-05 20:45:57.491295030 -0400
@@ -71,6 +71,7 @@
*
* The preference of the default trusted KeyStore is:
* javax.net.ssl.trustStore
+ * system environment variable JAVAX_NET_SSL_TRUSTSTORE
* jssecacerts
* cacerts
*/
@@ -144,6 +145,9 @@
String temporaryName = "";
File temporaryFile = null;
long temporaryTime = 0L;
+ if (storePropName == null){
+ storePropName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE");
+ }
if (!"NONE".equals(storePropName)) {
String[] fileNames =
new String[] {storePropName, defaultStore};