Skip to content

Instantly share code, notes, and snippets.

@Thynix
Last active November 6, 2018 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thynix/f02f9ba33e296d037defd60972dd39fd to your computer and use it in GitHub Desktop.
Save Thynix/f02f9ba33e296d037defd60972dd39fd to your computer and use it in GitHub Desktop.
Script to allow disabling JRE ECDSA for a Java 7 Docker jar build
# Disable ECDSA to avoid `Exception in thread "main" javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidKeyException: EC parameters error`
# when running ./gradlew jar; see https://github.com/docker-library/openjdk/issues/117#issuecomment-307222367
sed -i 's/RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224/RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, ECDSA/' /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/java.security
./gradlew jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment