mirror of
https://github.com/corda/corda.git
synced 2024-12-22 06:17:55 +00:00
Register crypto providers after we init logging (#3067)
* Register crypto providers after we init logging
This commit is contained in:
parent
a61aa5d645
commit
fe87f16d98
@ -3,15 +3,10 @@
|
|||||||
|
|
||||||
package net.corda.node
|
package net.corda.node
|
||||||
|
|
||||||
import net.corda.core.crypto.CordaSecurityProvider
|
|
||||||
import net.corda.core.crypto.Crypto
|
|
||||||
import net.corda.node.internal.NodeStartup
|
import net.corda.node.internal.NodeStartup
|
||||||
import kotlin.system.exitProcess
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
// 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.
|
// 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
|
// 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.
|
// to embed Node in your own container, instantiate it directly and set up the configuration objects yourself.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package net.corda.node.internal
|
package net.corda.node.internal
|
||||||
|
|
||||||
import com.jcabi.manifests.Manifests
|
import com.jcabi.manifests.Manifests
|
||||||
|
import net.corda.core.crypto.Crypto
|
||||||
import net.corda.core.internal.Emoji
|
import net.corda.core.internal.Emoji
|
||||||
import net.corda.core.internal.concurrent.thenMatch
|
import net.corda.core.internal.concurrent.thenMatch
|
||||||
import net.corda.core.internal.createDirectories
|
import net.corda.core.internal.createDirectories
|
||||||
@ -55,6 +56,11 @@ open class NodeStartup(val args: Array<String>) {
|
|||||||
|
|
||||||
initLogging(cmdlineOptions)
|
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()
|
val versionInfo = getVersionInfo()
|
||||||
|
|
||||||
if (cmdlineOptions.isVersion) {
|
if (cmdlineOptions.isVersion) {
|
||||||
|
Loading…
Reference in New Issue
Block a user