Permalink
Browse files

#224 Fixing the 'sed' command that fixes the SecureRandom to be Mac-…

…compatible.
  • Loading branch information...
cowboygneox committed Jan 3, 2017
1 parent 952a788 commit dd68803cf570495a517903dad8edeb5bb90c20a3
Showing with 4 additions and 4 deletions.
  1. +1 −1 Dockerfile-jdk7
  2. +1 −1 Dockerfile-jdk8
  3. +2 −2 readme.md
View
@@ -1,4 +1,4 @@
FROM openjdk:7u111-jdk
ADD betamax.pem /
RUN keytool -importcert -keystore $JAVA_HOME/jre/lib/security/cacerts -file betamax.pem -storepass changeit -noprompt
-RUN sed -i 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/urandom/' $JAVA_HOME/jre/lib/security/java.security
+RUN sed -i -e 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/urandom/' $JAVA_HOME/jre/lib/security/java.security
View
@@ -1,4 +1,4 @@
FROM openjdk:8u111-jdk
ADD betamax.pem /
RUN keytool -importcert -keystore $JAVA_HOME/jre/lib/security/cacerts -file betamax.pem -storepass changeit -noprompt
-RUN sed -i 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/urandom/' $JAVA_HOME/jre/lib/security/java.security
+RUN sed -i -e 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/urandom/' $JAVA_HOME/jre/lib/security/java.security
View
@@ -60,9 +60,9 @@ JDK 7 dramatically increased the security of the JVM, making it much more diffic
`SecureRandom` requires a significant amount of entropy in order to generate random numbers, and when using SSL, Betamax stresses this aggressively. When `SecureRandom` fails to generate a random in a given time frame (usually around 3 seconds), a test will fail with almost no indiciation as to why, other than an SSL error occurred. It is likely best to get ahead of that issue before it becomes one, especially if your CI environment is Docker/Virtual Machine based.
-**To ensure `SecureRandom` will have adequate entropy:**
+**To ensure `SecureRandom` will have adequate entropy on Unix-based systems:**
- sed -i 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/urandom/' $JAVA_HOME/jre/lib/security/java.security
+ sed -i -e 's/securerandom.source=file:\/dev\/random/securerandom.source=file:\/dev\/urandom/' $JAVA_HOME/jre/lib/security/java.security
**Files to Ignore:**

0 comments on commit dd68803

Please sign in to comment.