From 26553b29654725460983f2d0e19b8206da586c2f Mon Sep 17 00:00:00 2001
From: Shane <shane@axiomdatascience.com>
Date: Fri, 11 Mar 2016 08:46:42 +0800
Subject: [PATCH] Add ability to enable strong cryptography with Oracle JDK

---
 Dockerfile |    4 ++++
 .gitignore |    1 +
 README.md  |    4 ++++
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2558121..f9c80f1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
 resources/geoserver.zip
 resources/plugins/*.zip
 resources/*jdk-*-linux-x64.tar.gz
+resources/jce_policy.zip
 .idea
diff --git a/Dockerfile b/Dockerfile
index 6322f4c..edf49bc 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -51,6 +51,10 @@
        ln -s --force /usr/lib/jvm/java-7-oracle /usr/lib/jvm/default-java && \
        rm -rf /var/lib/apt/lists/* && \
        rm -rf /var/cache/oracle-jdk7-installer; \
+       if [ -f /tmp/resources/jce_policy.zip ]; then \
+         unzip -j /tmp/resources/jce_policy.zip -d /tmp/jce_policy && \
+         mv /tmp/jce_policy/*.jar $JAVA_HOME/jre/lib/security/; \
+       fi; \
     fi;
 
 # A little logic that will fetch the geoserver war zip file if it
diff --git a/README.md b/README.md
index b7d90b6..360517a 100644
--- a/README.md
+++ b/README.md
@@ -52,6 +52,10 @@
 [webupd8team's Oracle JDK installer](https://launchpad.net/~webupd8team/+archive/ubuntu/java/+packages)
 (usually the latest version available from Oracle) and place it in `resources` before building.
 
+To enable strong cryptography when using the Oracle JDK (recommended), download the
+[Oracle Java policy jar zip](http://docs.geoserver.org/latest/en/user/production/java.html#oracle-java)
+for the correct JDK version and place it at `resources/jce_policy.zip` before building.
+
 ### Building with plugins
 
 To build a GeoServer image with plugins (e.g. SQL Server plugin, Excel output plugin),

--
Gitblit v0.0.0-SNAPSHOT