mirror of
https://github.com/corda/corda.git
synced 2024-12-25 07:31:10 +00:00
Add sanity check that unlimited strength policy is installed (#183)
* Add sanity check that unlimited strength policy is installed * Add HSM keys to ignore list
This commit is contained in:
parent
4aa2a8ea18
commit
e309095ad4
3
.gitignore
vendored
3
.gitignore
vendored
@ -110,3 +110,6 @@ TODO
|
||||
/sgx-jvm/avian/
|
||||
/sgx-jvm/linux-sgx/
|
||||
/sgx-jvm/jvm-enclave/proguard.jar
|
||||
|
||||
# HSM keys
|
||||
*.key
|
||||
|
@ -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<String>) {
|
||||
// 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user