diff --git a/node/src/main/kotlin/net/corda/node/Corda.kt b/node/src/main/kotlin/net/corda/node/Corda.kt index 2c820e992f..5889aacdc7 100644 --- a/node/src/main/kotlin/net/corda/node/Corda.kt +++ b/node/src/main/kotlin/net/corda/node/Corda.kt @@ -3,15 +3,10 @@ package net.corda.node -import net.corda.core.crypto.CordaSecurityProvider -import net.corda.core.crypto.Crypto import net.corda.node.internal.NodeStartup import kotlin.system.exitProcess fun main(args: Array) { - // Register all cryptography [Provider]s first thing on boot. - // Required to install our [SecureRandom] before e.g., UUID asks for one. - Crypto.registerProviders() // Pass the arguments to the Node factory. In the Enterprise edition, this line is modified to point to a subclass. // It will exit the process in case of startup failure and is not intended to be used by embedders. If you want // to embed Node in your own container, instantiate it directly and set up the configuration objects yourself. diff --git a/node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt b/node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt index 19a58b25fa..3a654b77a7 100644 --- a/node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt +++ b/node/src/main/kotlin/net/corda/node/internal/NodeStartup.kt @@ -1,6 +1,7 @@ package net.corda.node.internal import com.jcabi.manifests.Manifests +import net.corda.core.crypto.Crypto import net.corda.core.internal.Emoji import net.corda.core.internal.concurrent.thenMatch import net.corda.core.internal.createDirectories @@ -55,6 +56,11 @@ open class NodeStartup(val args: Array) { initLogging(cmdlineOptions) + // Register all cryptography [Provider]s. + // Required to install our [SecureRandom] before e.g., UUID asks for one. + // This needs to go after initLogging(netty clashes with our logging). + Crypto.registerProviders() + val versionInfo = getVersionInfo() if (cmdlineOptions.isVersion) {