mirror of
https://github.com/corda/corda.git
synced 2024-12-28 00:38:55 +00:00
added optional config property for keystore file path (#748)
This commit is contained in:
parent
9cbf7fd7ab
commit
ac99b81ba8
@ -25,6 +25,8 @@ networkRootTrustStorePassword Network root trust store password, to be provide
|
||||
keyStorePassword Generated keystore's password. Optional, the tool will prompt for password input if not provided.
|
||||
|
||||
trustStorePassword Generated trust store's password. Optional, the tool will prompt for password input if not provided.
|
||||
|
||||
keystorePath [Optional] Path of the generated keystore file, default to certificates/notaryidentitykeystore.jks
|
||||
```
|
||||
|
||||
Example config file
|
||||
|
@ -43,6 +43,7 @@ fun RegistrationOption.runRegistration() {
|
||||
override val trustStorePassword: String by lazy { config.trustStorePassword ?: readPassword("Node TrustStore password:") }
|
||||
val parent = configFile.parent
|
||||
override val certificatesDirectory: Path = if (parent != null) parent / "certificates" else Paths.get("certificates")
|
||||
override val nodeKeystore: Path get() = config.keystorePath ?: certificatesDirectory/"notaryidentitykeystore.jks"
|
||||
}
|
||||
|
||||
NetworkRegistrationHelper(sslConfig,
|
||||
@ -59,4 +60,5 @@ data class NotaryRegistrationConfig(val legalName: CordaX500Name,
|
||||
val networkRootTrustStorePath: Path,
|
||||
val keyStorePassword: String?,
|
||||
val networkRootTrustStorePassword: String?,
|
||||
val trustStorePassword: String?)
|
||||
val trustStorePassword: String?,
|
||||
val keystorePath: Path?)
|
||||
|
@ -32,6 +32,7 @@ legalName {
|
||||
email = "test@email.com"
|
||||
compatibilityZoneURL = "http://doorman.url.com"
|
||||
networkRootTrustStorePath = "networkRootTrustStore.jks"
|
||||
keystorePath = "notaryidentitykeystore.jks"
|
||||
|
||||
networkRootTrustStorePassword = "password"
|
||||
keyStorePassword = "password"
|
||||
@ -47,5 +48,6 @@ trustStorePassword = "password"
|
||||
assertEquals("test@email.com", config.email)
|
||||
assertEquals(Paths.get("networkRootTrustStore.jks"), config.networkRootTrustStorePath)
|
||||
assertEquals("password", config.networkRootTrustStorePassword)
|
||||
assertEquals(Paths.get("notaryidentitykeystore.jks"), config.keystorePath)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user