mirror of
https://github.com/corda/corda.git
synced 2025-06-16 06:08:13 +00:00
Unduplicate certificatesDirectory (#740)
This commit is contained in:
@ -2,16 +2,14 @@ package net.corda.webserver
|
||||
|
||||
import com.google.common.net.HostAndPort
|
||||
import com.typesafe.config.Config
|
||||
import net.corda.core.div
|
||||
import net.corda.nodeapi.config.SSLConfiguration
|
||||
import net.corda.nodeapi.config.NodeSSLConfiguration
|
||||
import net.corda.nodeapi.config.getValue
|
||||
import java.nio.file.Path
|
||||
|
||||
/**
|
||||
* [baseDirectory] is not retrieved from the config file but rather from a command line argument.
|
||||
*/
|
||||
class WebServerConfig(val baseDirectory: Path, val config: Config) : SSLConfiguration {
|
||||
override val certificatesDirectory: Path get() = baseDirectory / "certificates"
|
||||
class WebServerConfig(override val baseDirectory: Path, val config: Config) : NodeSSLConfiguration {
|
||||
override val keyStorePassword: String by config
|
||||
override val trustStorePassword: String by config
|
||||
val exportJMXto: String get() = "http"
|
||||
@ -19,4 +17,4 @@ class WebServerConfig(val baseDirectory: Path, val config: Config) : SSLConfigur
|
||||
val myLegalName: String by config
|
||||
val p2pAddress: HostAndPort by config // TODO: Use RPC port instead of P2P port (RPC requires authentication, P2P does not)
|
||||
val webAddress: HostAndPort by config
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user