mirror of
https://github.com/corda/corda.git
synced 2025-01-13 08:20:01 +00:00
ENT-1662: Print better message when no keystore (#634)
Print better message when no keystore ENT-1662 Clarify how to run the node in network-management README.
This commit is contained in:
parent
447b41d936
commit
848c516422
@ -193,7 +193,7 @@ networkMap {
|
||||
By default it will expect trust store file received from the doorman to be in the location ``certificates/network-root-truststore.jks``.
|
||||
This can be overridden with the additional `--network-root-truststore` flag.
|
||||
|
||||
NOTE: This step applies to all nodes that wish to register with the doorman.
|
||||
NOTE: This step applies to all nodes that wish to register with the doorman. You will have to configure ``compatibiityZoneURL`` and set ``devMode`` to false on each node.
|
||||
|
||||
### 4. Generate node info files for notary nodes
|
||||
Once notary nodes are registered, run the notary nodes with the `just-generate-node-info` flag.
|
||||
|
@ -13,9 +13,11 @@ package com.r3.corda.networkmanage.doorman
|
||||
import com.jcabi.manifests.Manifests
|
||||
import com.r3.corda.networkmanage.common.utils.*
|
||||
import com.r3.corda.networkmanage.doorman.signer.LocalSigner
|
||||
import net.corda.core.internal.exists
|
||||
import net.corda.nodeapi.internal.crypto.X509KeyStore
|
||||
import net.corda.nodeapi.internal.crypto.X509Utilities
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.nio.file.NoSuchFileException
|
||||
import java.time.Instant
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
@ -51,7 +53,10 @@ data class NetworkManagementServerStatus(var serverStartTime: Instant = Instant.
|
||||
|
||||
private fun processKeyStore(config: NetworkManagementServerConfig): Pair<CertPathAndKey, LocalSigner>? {
|
||||
if (config.keystorePath == null) return null
|
||||
|
||||
if (!config.keystorePath.exists()) {
|
||||
println("Could not find keystore: ${config.keystorePath}. You need to create it first or point to the correct location. Please consult the documentation.")
|
||||
exitProcess(0)
|
||||
}
|
||||
// Get password from console if not in config.
|
||||
val keyStorePassword = config.keystorePassword ?: readPassword("Key store password: ")
|
||||
val privateKeyPassword = config.caPrivateKeyPassword ?: readPassword("Private key password: ")
|
||||
|
Loading…
Reference in New Issue
Block a user