Skip to content

Commit

Permalink
Merge pull request #63 from palantir/feature/entropy
Browse files Browse the repository at this point in the history
Default to insecure entropy source
  • Loading branch information
markelliot committed Apr 3, 2016
2 parents 623cf9d + 646da15 commit 98316fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ package com.palantir.gradle.javadist;

class DistributionExtension {

private static final List<String> requiredJvmOpts = ['-Djava.security.egd=file:/dev/./urandom']

private String serviceName
private String mainClass
private List<String> args = []
Expand Down Expand Up @@ -61,7 +63,7 @@ class DistributionExtension {
}

public List<String> getDefaultJvmOpts() {
return defaultJvmOpts
return requiredJvmOpts + defaultJvmOpts
}

public boolean isEnableManifestClasspath() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ class JavaDistributionPluginTests extends Specification {
// check start script uses default JVM options
new File(projectDir, 'dist/service-name-0.1/service/bin/service-name').exists()
String startScript = readFully('dist/service-name-0.1/service/bin/service-name')
startScript.contains('DEFAULT_JVM_OPTS=\'"-Xmx4M" "-Djavax.net.ssl.trustStore=truststore.jks"\'')
startScript.contains('DEFAULT_JVM_OPTS=\'"-Djava.security.egd=file:/dev/./urandom" "-Xmx4M" "-Djavax.net.ssl.trustStore=truststore.jks"\'')
}

def 'produce distribution bundle that populates config.sh' () {
Expand Down

0 comments on commit 98316fc

Please sign in to comment.