mirror of
https://github.com/corda/corda.git
synced 2025-06-16 06:08:13 +00:00
[CORDA:936]: Enable RPC layer to work with SSL
This commit is contained in:
committed by
GitHub
parent
70f1fdeb2b
commit
142f52fa82
@ -2,8 +2,8 @@ package net.corda.webserver
|
||||
|
||||
import com.typesafe.config.Config
|
||||
import net.corda.core.utilities.NetworkHostAndPort
|
||||
import net.corda.nodeapi.internal.config.User
|
||||
import net.corda.nodeapi.internal.config.NodeSSLConfiguration
|
||||
import net.corda.nodeapi.internal.config.User
|
||||
import net.corda.nodeapi.internal.config.getValue
|
||||
import java.nio.file.Path
|
||||
|
||||
@ -16,7 +16,15 @@ class WebServerConfig(override val baseDirectory: Path, val config: Config) : No
|
||||
val exportJMXto: String get() = "http"
|
||||
val useHTTPS: Boolean by config
|
||||
val myLegalName: String by config
|
||||
val rpcAddress: NetworkHostAndPort by config
|
||||
val rpcAddress: NetworkHostAndPort by lazy {
|
||||
if (config.hasPath("rpcSettings.address")) {
|
||||
return@lazy NetworkHostAndPort.parse(config.getString("rpcSettings.address"))
|
||||
}
|
||||
if (config.hasPath("rpcAddress")) {
|
||||
return@lazy NetworkHostAndPort.parse(config.getString("rpcAddress"))
|
||||
}
|
||||
throw Exception("Missing rpc address property. Either 'rpcSettings' or 'rpcAddress' must be specified.")
|
||||
}
|
||||
val webAddress: NetworkHostAndPort by config
|
||||
val rpcUsers: List<User> by config
|
||||
}
|
||||
|
Reference in New Issue
Block a user