diff --git a/.gitignore b/.gitignore index 65727aecdf..bc47e81b2e 100644 --- a/.gitignore +++ b/.gitignore @@ -110,3 +110,6 @@ TODO /sgx-jvm/avian/ /sgx-jvm/linux-sgx/ /sgx-jvm/jvm-enclave/proguard.jar + +# HSM keys +*.key diff --git a/network-management/src/main/kotlin/com/r3/corda/networkmanage/hsm/Main.kt b/network-management/src/main/kotlin/com/r3/corda/networkmanage/hsm/Main.kt index b9c27588fb..4b881005cc 100644 --- a/network-management/src/main/kotlin/com/r3/corda/networkmanage/hsm/Main.kt +++ b/network-management/src/main/kotlin/com/r3/corda/networkmanage/hsm/Main.kt @@ -18,9 +18,15 @@ import com.r3.corda.networkmanage.hsm.signer.HsmNetworkMapSigner import com.r3.corda.networkmanage.hsm.utils.mapCryptoServerException import org.bouncycastle.jce.provider.BouncyCastleProvider import java.security.Security - +import javax.crypto.Cipher fun main(args: Array) { + // Grabbed from https://stackoverflow.com/questions/7953567/checking-if-unlimited-cryptography-is-available + if (Cipher.getMaxAllowedKeyLength("AES") < 256) { + System.err.println("Unlimited Strength Jurisdiction Policy Files must be installed, see http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html") + System.exit(1) + } + try { run(parseParameters(*args)) } catch (e: ShowHelpException) {