From 2fbeab13659933b9537d88c0d73a73e1e0ab8060 Mon Sep 17 00:00:00 2001 From: Michele Sollecito Date: Wed, 5 Sep 2018 13:06:05 +0100 Subject: [PATCH] Fixed compilation error for case-insensitive operating systems. (#3896) --- .../net/corda/client/rpc/CordaRPCClient.kt | 2 +- .../corda/client/rpc/internal/RPCClient.kt | 6 +- .../net/corda/nodeapi/ArtemisTcpTransport.kt | 105 ------------------ .../net/corda/nodeapi/BrokerRpcSslOptions.kt | 5 + .../internal/ArtemisMessagingClient.kt | 2 +- ...TcpTransport.kt => ArtemisTcpTransport.kt} | 2 +- .../internal/config/SslConfiguration.kt | 29 +---- .../internal/protonwrapper/netty/SSLHelper.kt | 10 +- .../net/corda/node/amqp/ProtonWrapperTests.kt | 4 +- .../node/services/rpc/ArtemisRpcTests.kt | 2 +- .../services/messaging/SimpleMQClient.kt | 2 +- .../messaging/ArtemisMessagingServer.kt | 2 +- .../messaging/InternalRPCMessagingClient.kt | 4 +- .../services/messaging/P2PMessagingClient.kt | 2 +- .../services/rpc/RpcBrokerConfiguration.kt | 4 +- .../corda/testing/node/internal/RPCDriver.kt | 8 +- 16 files changed, 31 insertions(+), 158 deletions(-) delete mode 100644 node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt create mode 100644 node-api/src/main/kotlin/net/corda/nodeapi/BrokerRpcSslOptions.kt rename node-api/src/main/kotlin/net/corda/nodeapi/internal/{InternalArtemisTcpTransport.kt => ArtemisTcpTransport.kt} (99%) diff --git a/client/rpc/src/main/kotlin/net/corda/client/rpc/CordaRPCClient.kt b/client/rpc/src/main/kotlin/net/corda/client/rpc/CordaRPCClient.kt index c6b9d0556e..a003ea1c16 100644 --- a/client/rpc/src/main/kotlin/net/corda/client/rpc/CordaRPCClient.kt +++ b/client/rpc/src/main/kotlin/net/corda/client/rpc/CordaRPCClient.kt @@ -11,7 +11,7 @@ import net.corda.core.messaging.ClientRpcSslOptions import net.corda.core.utilities.days import net.corda.core.utilities.minutes import net.corda.core.utilities.seconds -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.rpcConnectorTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.rpcConnectorTcpTransport import net.corda.serialization.internal.AMQP_RPC_CLIENT_CONTEXT import java.time.Duration diff --git a/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClient.kt b/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClient.kt index 1665aa0159..f34da0a84a 100644 --- a/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClient.kt +++ b/client/rpc/src/main/kotlin/net/corda/client/rpc/internal/RPCClient.kt @@ -16,9 +16,9 @@ import net.corda.core.serialization.internal.nodeSerializationEnv import net.corda.core.utilities.NetworkHostAndPort import net.corda.core.utilities.contextLogger import net.corda.nodeapi.RPCApi -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.rpcConnectorTcpTransport -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.rpcConnectorTcpTransportsFromList -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.rpcInternalClientTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.rpcConnectorTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.rpcConnectorTcpTransportsFromList +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.rpcInternalClientTcpTransport import net.corda.nodeapi.internal.config.SslConfiguration import org.apache.activemq.artemis.api.core.SimpleString import org.apache.activemq.artemis.api.core.TransportConfiguration diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt b/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt deleted file mode 100644 index 210f04586a..0000000000 --- a/node-api/src/main/kotlin/net/corda/nodeapi/ArtemisTcpTransport.kt +++ /dev/null @@ -1,105 +0,0 @@ -package net.corda.nodeapi - -import net.corda.core.messaging.ClientRpcSslOptions -import net.corda.core.utilities.NetworkHostAndPort -import net.corda.nodeapi.internal.InternalArtemisTcpTransport -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.acceptorFactoryClassName -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.connectorFactoryClassName -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.defaultArtemisOptions -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.defaultSSLOptions -import net.corda.nodeapi.internal.config.SSLConfiguration -import net.corda.nodeapi.internal.config.SslConfiguration -import net.corda.nodeapi.internal.requireOnDefaultFileSystem -import org.apache.activemq.artemis.api.core.TransportConfiguration -import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants -import java.nio.file.Path - -/** Class to set Artemis TCP configuration options. */ -class ArtemisTcpTransport { - companion object { - /** - * Corda supported TLS schemes. - *

- * As shown above, current version restricts enabled TLS cipher suites to: - * AES128 using Galois/Counter Mode (GCM) for the block cipher being used to encrypt the message stream. - * SHA256 as message authentication algorithm. - * Ephemeral Diffie Hellman key exchange for advanced forward secrecy. ECDHE is preferred, but DHE is also - * supported in case one wants to completely avoid the use of ECC for TLS. - * ECDSA and RSA for digital signatures. Our self-generated certificates all use ECDSA for handshakes, - * but we allow classical RSA certificates to work in case one uses external tools or cloud providers or HSMs - * that do not support ECC certificates. - */ - val CIPHER_SUITES = listOf( - "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - ) - - /** Supported TLS versions, currently TLSv1.2 only. */ - val TLS_VERSIONS = listOf("TLSv1.2") - - private fun SSLConfiguration.toTransportOptions() = mapOf( - TransportConstants.SSL_ENABLED_PROP_NAME to true, - TransportConstants.KEYSTORE_PROVIDER_PROP_NAME to "JKS", - TransportConstants.KEYSTORE_PATH_PROP_NAME to sslKeystore, - TransportConstants.KEYSTORE_PASSWORD_PROP_NAME to keyStorePassword, - TransportConstants.TRUSTSTORE_PROVIDER_PROP_NAME to "JKS", - TransportConstants.TRUSTSTORE_PATH_PROP_NAME to trustStoreFile, - TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME to trustStorePassword, - TransportConstants.NEED_CLIENT_AUTH_PROP_NAME to true) - - fun p2pAcceptorTcpTransport(hostAndPort: NetworkHostAndPort, config: SSLConfiguration?, enableSSL: Boolean = true): TransportConfiguration { - val options = defaultArtemisOptions(hostAndPort).toMutableMap() - - if (config != null && enableSSL) { - config.sslKeystore.requireOnDefaultFileSystem() - config.trustStoreFile.requireOnDefaultFileSystem() - options.putAll(defaultSSLOptions) - options.putAll(config.toTransportOptions()) - } - return TransportConfiguration(acceptorFactoryClassName, options) - } - - fun p2pConnectorTcpTransport(hostAndPort: NetworkHostAndPort, config: SSLConfiguration?, enableSSL: Boolean = true): TransportConfiguration { - val options = defaultArtemisOptions(hostAndPort).toMutableMap() - - if (config != null && enableSSL) { - config.sslKeystore.requireOnDefaultFileSystem() - config.trustStoreFile.requireOnDefaultFileSystem() - options.putAll(defaultSSLOptions) - options.putAll(config.toTransportOptions()) - } - return TransportConfiguration(connectorFactoryClassName, options) - } - - /** [TransportConfiguration] for RPC TCP communication - server side. */ - fun rpcAcceptorTcpTransport(hostAndPort: NetworkHostAndPort, config: BrokerRpcSslOptions?, enableSSL: Boolean = true): TransportConfiguration { - return InternalArtemisTcpTransport.rpcAcceptorTcpTransport(hostAndPort, config, enableSSL) - } - - /** [TransportConfiguration] for RPC TCP communication - * This is the Transport that connects the client JVM to the broker. */ - fun rpcConnectorTcpTransport(hostAndPort: NetworkHostAndPort, config: ClientRpcSslOptions?, enableSSL: Boolean = true): TransportConfiguration { - return InternalArtemisTcpTransport.rpcConnectorTcpTransport(hostAndPort, config, enableSSL) - } - - /** Create as list of [TransportConfiguration]. **/ - fun rpcConnectorTcpTransportsFromList(hostAndPortList: List, config: ClientRpcSslOptions?, enableSSL: Boolean = true): List = hostAndPortList.map { - rpcConnectorTcpTransport(it, config, enableSSL) - } - - fun rpcInternalClientTcpTransport(hostAndPort: NetworkHostAndPort, config: SslConfiguration): TransportConfiguration { - return InternalArtemisTcpTransport.rpcInternalClientTcpTransport(hostAndPort, config) - } - - fun rpcInternalAcceptorTcpTransport(hostAndPort: NetworkHostAndPort, config: SslConfiguration): TransportConfiguration { - return InternalArtemisTcpTransport.rpcInternalAcceptorTcpTransport(hostAndPort, config) - } - } -} - -data class BrokerRpcSslOptions(val keyStorePath: Path, val keyStorePassword: String) diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/BrokerRpcSslOptions.kt b/node-api/src/main/kotlin/net/corda/nodeapi/BrokerRpcSslOptions.kt new file mode 100644 index 0000000000..2509b83617 --- /dev/null +++ b/node-api/src/main/kotlin/net/corda/nodeapi/BrokerRpcSslOptions.kt @@ -0,0 +1,5 @@ +package net.corda.nodeapi + +import java.nio.file.Path + +data class BrokerRpcSslOptions(val keyStorePath: Path, val keyStorePassword: String) \ No newline at end of file diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/ArtemisMessagingClient.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/ArtemisMessagingClient.kt index 055c96ffe6..4af839bc13 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/ArtemisMessagingClient.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/ArtemisMessagingClient.kt @@ -33,7 +33,7 @@ class ArtemisMessagingClient(private val config: MutualSslConfiguration, check(started == null) { "start can't be called twice" } log.info("Connecting to message broker: $serverAddress") // TODO Add broker CN to config for host verification in case the embedded broker isn't used - val tcpTransport = InternalArtemisTcpTransport.p2pConnectorTcpTransport(serverAddress, config) + val tcpTransport = ArtemisTcpTransport.p2pConnectorTcpTransport(serverAddress, config) val locator = ActiveMQClient.createServerLocatorWithoutHA(tcpTransport).apply { // Never time out on our loopback Artemis connections. If we switch back to using the InVM transport this // would be the default and the two lines below can be deleted. diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/InternalArtemisTcpTransport.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/ArtemisTcpTransport.kt similarity index 99% rename from node-api/src/main/kotlin/net/corda/nodeapi/internal/InternalArtemisTcpTransport.kt rename to node-api/src/main/kotlin/net/corda/nodeapi/internal/ArtemisTcpTransport.kt index 85513c9ad1..18762cf959 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/InternalArtemisTcpTransport.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/ArtemisTcpTransport.kt @@ -14,7 +14,7 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants import java.nio.file.Path // This avoids internal types from leaking in the public API. The "external" ArtemisTcpTransport delegates to this internal one. -class InternalArtemisTcpTransport { +class ArtemisTcpTransport { companion object { val CIPHER_SUITES = listOf( "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/config/SslConfiguration.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/config/SslConfiguration.kt index 1011d49f9d..d8349bc80e 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/config/SslConfiguration.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/config/SslConfiguration.kt @@ -1,9 +1,5 @@ package net.corda.nodeapi.internal.config -import net.corda.core.internal.div -import net.corda.nodeapi.internal.crypto.X509KeyStore -import java.nio.file.Path - interface SslConfiguration { val keyStore: FileBasedCertificateStoreSupplier? @@ -24,27 +20,4 @@ interface MutualSslConfiguration : SslConfiguration { override val trustStore: FileBasedCertificateStoreSupplier } -private class MutualSslOptions(override val keyStore: FileBasedCertificateStoreSupplier, override val trustStore: FileBasedCertificateStoreSupplier) : MutualSslConfiguration - -// Don't use this internally. It's still here because it's used by ArtemisTcpTransport, which is in public node-api by mistake. -interface SSLConfiguration { - val keyStorePassword: String - val trustStorePassword: String - val certificatesDirectory: Path - val sslKeystore: Path get() = certificatesDirectory / "sslkeystore.jks" - val nodeKeystore: Path get() = certificatesDirectory / "nodekeystore.jks" - val trustStoreFile: Path get() = certificatesDirectory / "truststore.jks" - val crlCheckSoftFail: Boolean - - fun loadTrustStore(createNew: Boolean = false): X509KeyStore { - return X509KeyStore.fromFile(trustStoreFile, trustStorePassword, createNew) - } - - fun loadNodeKeyStore(createNew: Boolean = false): X509KeyStore { - return X509KeyStore.fromFile(nodeKeystore, keyStorePassword, createNew) - } - - fun loadSslKeyStore(createNew: Boolean = false): X509KeyStore { - return X509KeyStore.fromFile(sslKeystore, keyStorePassword, createNew) - } -} \ No newline at end of file +private class MutualSslOptions(override val keyStore: FileBasedCertificateStoreSupplier, override val trustStore: FileBasedCertificateStoreSupplier) : MutualSslConfiguration \ No newline at end of file diff --git a/node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/SSLHelper.kt b/node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/SSLHelper.kt index 6ffd49cc2d..c54eed8ef5 100644 --- a/node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/SSLHelper.kt +++ b/node-api/src/main/kotlin/net/corda/nodeapi/internal/protonwrapper/netty/SSLHelper.kt @@ -5,7 +5,7 @@ import net.corda.core.crypto.newSecureRandom import net.corda.core.utilities.NetworkHostAndPort import net.corda.core.utilities.contextLogger import net.corda.core.utilities.toHex -import net.corda.nodeapi.internal.InternalArtemisTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport import net.corda.nodeapi.internal.config.CertificateStore import net.corda.nodeapi.internal.crypto.toBc import org.bouncycastle.asn1.x509.AuthorityKeyIdentifier @@ -110,8 +110,8 @@ internal fun createClientSslHelper(target: NetworkHostAndPort, sslContext.init(keyManagers, trustManagers, newSecureRandom()) val sslEngine = sslContext.createSSLEngine(target.host, target.port) sslEngine.useClientMode = true - sslEngine.enabledProtocols = InternalArtemisTcpTransport.TLS_VERSIONS.toTypedArray() - sslEngine.enabledCipherSuites = InternalArtemisTcpTransport.CIPHER_SUITES.toTypedArray() + sslEngine.enabledProtocols = ArtemisTcpTransport.TLS_VERSIONS.toTypedArray() + sslEngine.enabledCipherSuites = ArtemisTcpTransport.CIPHER_SUITES.toTypedArray() sslEngine.enableSessionCreation = true return SslHandler(sslEngine) } @@ -125,8 +125,8 @@ internal fun createServerSslHelper(keyManagerFactory: KeyManagerFactory, val sslEngine = sslContext.createSSLEngine() sslEngine.useClientMode = false sslEngine.needClientAuth = true - sslEngine.enabledProtocols = InternalArtemisTcpTransport.TLS_VERSIONS.toTypedArray() - sslEngine.enabledCipherSuites = InternalArtemisTcpTransport.CIPHER_SUITES.toTypedArray() + sslEngine.enabledProtocols = ArtemisTcpTransport.TLS_VERSIONS.toTypedArray() + sslEngine.enabledCipherSuites = ArtemisTcpTransport.CIPHER_SUITES.toTypedArray() sslEngine.enableSessionCreation = true return SslHandler(sslEngine) } diff --git a/node/src/integration-test/kotlin/net/corda/node/amqp/ProtonWrapperTests.kt b/node/src/integration-test/kotlin/net/corda/node/amqp/ProtonWrapperTests.kt index 5ef36c2372..d89481abb8 100644 --- a/node/src/integration-test/kotlin/net/corda/node/amqp/ProtonWrapperTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/amqp/ProtonWrapperTests.kt @@ -14,7 +14,7 @@ import net.corda.node.services.config.configureWithDevSSLCertificate import net.corda.node.services.messaging.ArtemisMessagingServer import net.corda.nodeapi.internal.ArtemisMessagingClient import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.P2P_PREFIX -import net.corda.nodeapi.internal.InternalArtemisTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport import net.corda.nodeapi.internal.config.MutualSslConfiguration import net.corda.nodeapi.internal.registerDevP2pCertificates import net.corda.nodeapi.internal.crypto.* @@ -137,7 +137,7 @@ class ProtonWrapperTests { val serverSocketFactory = context.serverSocketFactory val serverSocket = serverSocketFactory.createServerSocket(serverPort) as SSLServerSocket - val serverParams = SSLParameters(InternalArtemisTcpTransport.CIPHER_SUITES.toTypedArray(), + val serverParams = SSLParameters(ArtemisTcpTransport.CIPHER_SUITES.toTypedArray(), arrayOf("TLSv1.2")) serverParams.wantClientAuth = true serverParams.needClientAuth = true diff --git a/node/src/integration-test/kotlin/net/corda/node/services/rpc/ArtemisRpcTests.kt b/node/src/integration-test/kotlin/net/corda/node/services/rpc/ArtemisRpcTests.kt index c64a3773f5..c1e3cc935b 100644 --- a/node/src/integration-test/kotlin/net/corda/node/services/rpc/ArtemisRpcTests.kt +++ b/node/src/integration-test/kotlin/net/corda/node/services/rpc/ArtemisRpcTests.kt @@ -18,7 +18,7 @@ import net.corda.node.utilities.createKeyPairAndSelfSignedTLSCertificate import net.corda.node.utilities.saveToKeyStore import net.corda.node.utilities.saveToTrustStore import net.corda.nodeapi.BrokerRpcSslOptions -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.rpcConnectorTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.rpcConnectorTcpTransport import net.corda.nodeapi.internal.config.MutualSslConfiguration import net.corda.nodeapi.internal.config.User import net.corda.testing.core.SerializationEnvironmentRule diff --git a/node/src/integration-test/kotlin/net/corda/services/messaging/SimpleMQClient.kt b/node/src/integration-test/kotlin/net/corda/services/messaging/SimpleMQClient.kt index e70e77d6b5..44e59852a9 100644 --- a/node/src/integration-test/kotlin/net/corda/services/messaging/SimpleMQClient.kt +++ b/node/src/integration-test/kotlin/net/corda/services/messaging/SimpleMQClient.kt @@ -3,7 +3,7 @@ package net.corda.services.messaging import net.corda.core.identity.CordaX500Name import net.corda.core.serialization.internal.nodeSerializationEnv import net.corda.core.utilities.NetworkHostAndPort -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.p2pConnectorTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.p2pConnectorTcpTransport import net.corda.nodeapi.internal.config.MutualSslConfiguration import net.corda.testing.internal.configureTestSSL import org.apache.activemq.artemis.api.core.client.* diff --git a/node/src/main/kotlin/net/corda/node/services/messaging/ArtemisMessagingServer.kt b/node/src/main/kotlin/net/corda/node/services/messaging/ArtemisMessagingServer.kt index bb46278787..2014ca46c2 100644 --- a/node/src/main/kotlin/net/corda/node/services/messaging/ArtemisMessagingServer.kt +++ b/node/src/main/kotlin/net/corda/node/services/messaging/ArtemisMessagingServer.kt @@ -17,7 +17,7 @@ import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.INTERNAL_P import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.JOURNAL_HEADER_SIZE import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.NOTIFICATIONS_ADDRESS import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.P2P_PREFIX -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.p2pAcceptorTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.p2pAcceptorTcpTransport import net.corda.nodeapi.internal.requireOnDefaultFileSystem import org.apache.activemq.artemis.api.core.SimpleString import org.apache.activemq.artemis.api.core.management.ActiveMQServerControl diff --git a/node/src/main/kotlin/net/corda/node/services/messaging/InternalRPCMessagingClient.kt b/node/src/main/kotlin/net/corda/node/services/messaging/InternalRPCMessagingClient.kt index abb07763d1..a484261ba5 100644 --- a/node/src/main/kotlin/net/corda/node/services/messaging/InternalRPCMessagingClient.kt +++ b/node/src/main/kotlin/net/corda/node/services/messaging/InternalRPCMessagingClient.kt @@ -7,7 +7,7 @@ import net.corda.core.serialization.internal.nodeSerializationEnv import net.corda.core.utilities.NetworkHostAndPort import net.corda.node.internal.security.RPCSecurityManager import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.NODE_RPC_USER -import net.corda.nodeapi.internal.InternalArtemisTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport import net.corda.nodeapi.internal.config.MutualSslConfiguration import org.apache.activemq.artemis.api.core.client.ActiveMQClient import org.apache.activemq.artemis.api.core.client.ServerLocator @@ -22,7 +22,7 @@ class InternalRPCMessagingClient(val sslConfig: MutualSslConfiguration, val serv fun init(rpcOps: RPCOps, securityManager: RPCSecurityManager) = synchronized(this) { - val tcpTransport = InternalArtemisTcpTransport.rpcInternalClientTcpTransport(serverAddress, sslConfig) + val tcpTransport = ArtemisTcpTransport.rpcInternalClientTcpTransport(serverAddress, sslConfig) locator = ActiveMQClient.createServerLocatorWithoutHA(tcpTransport).apply { // Never time out on our loopback Artemis connections. If we switch back to using the InVM transport this // would be the default and the two lines below can be deleted. diff --git a/node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt b/node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt index 95c340ead1..b78e971e78 100644 --- a/node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt +++ b/node/src/main/kotlin/net/corda/node/services/messaging/P2PMessagingClient.kt @@ -33,7 +33,7 @@ import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.BRIDGE_NOT import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.JOURNAL_HEADER_SIZE import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.P2PMessagingHeaders import net.corda.nodeapi.internal.ArtemisMessagingComponent.Companion.PEERS_PREFIX -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.p2pConnectorTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.p2pConnectorTcpTransport import net.corda.nodeapi.internal.bridging.BridgeControl import net.corda.nodeapi.internal.bridging.BridgeEntry import net.corda.nodeapi.internal.persistence.CordaPersistence diff --git a/node/src/main/kotlin/net/corda/node/services/rpc/RpcBrokerConfiguration.kt b/node/src/main/kotlin/net/corda/node/services/rpc/RpcBrokerConfiguration.kt index f17dcee8aa..9e1ace3c2a 100644 --- a/node/src/main/kotlin/net/corda/node/services/rpc/RpcBrokerConfiguration.kt +++ b/node/src/main/kotlin/net/corda/node/services/rpc/RpcBrokerConfiguration.kt @@ -7,8 +7,8 @@ import net.corda.node.internal.artemis.SecureArtemisConfiguration import net.corda.nodeapi.BrokerRpcSslOptions import net.corda.nodeapi.RPCApi import net.corda.nodeapi.internal.ArtemisMessagingComponent -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.rpcAcceptorTcpTransport -import net.corda.nodeapi.internal.InternalArtemisTcpTransport.Companion.rpcInternalAcceptorTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.rpcAcceptorTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport.Companion.rpcInternalAcceptorTcpTransport import net.corda.nodeapi.internal.config.MutualSslConfiguration import org.apache.activemq.artemis.api.core.SimpleString import org.apache.activemq.artemis.core.config.CoreQueueConfiguration diff --git a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/RPCDriver.kt b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/RPCDriver.kt index 94b38ddd2c..05b5662a83 100644 --- a/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/RPCDriver.kt +++ b/testing/node-driver/src/main/kotlin/net/corda/testing/node/internal/RPCDriver.kt @@ -22,7 +22,7 @@ import net.corda.node.internal.security.RPCSecurityManagerImpl import net.corda.node.services.messaging.RPCServer import net.corda.node.services.messaging.RPCServerConfiguration import net.corda.nodeapi.RPCApi -import net.corda.nodeapi.internal.InternalArtemisTcpTransport +import net.corda.nodeapi.internal.ArtemisTcpTransport import net.corda.serialization.internal.AMQP_RPC_CLIENT_CONTEXT import net.corda.testing.common.internal.testNetworkParameters import net.corda.testing.core.MAX_MESSAGE_SIZE @@ -220,14 +220,14 @@ data class RPCDriverDSL( bindingsDirectory = "$artemisDir/bindings" journalDirectory = "$artemisDir/journal" largeMessagesDirectory = "$artemisDir/large-messages" - acceptorConfigurations = setOf(InternalArtemisTcpTransport.rpcAcceptorTcpTransport(hostAndPort, null)) + acceptorConfigurations = setOf(ArtemisTcpTransport.rpcAcceptorTcpTransport(hostAndPort, null)) configureCommonSettings(maxFileSize, maxBufferedBytesPerClient) } } val inVmClientTransportConfiguration = TransportConfiguration(InVMConnectorFactory::class.java.name) fun createNettyClientTransportConfiguration(hostAndPort: NetworkHostAndPort): TransportConfiguration { - return InternalArtemisTcpTransport.rpcConnectorTcpTransport(hostAndPort, null) + return ArtemisTcpTransport.rpcConnectorTcpTransport(hostAndPort, null) } } @@ -339,7 +339,7 @@ data class RPCDriverDSL( configuration: CordaRPCClientConfiguration = CordaRPCClientConfiguration.DEFAULT ): CordaFuture { return driverDSL.executorService.fork { - val client = RPCClient(InternalArtemisTcpTransport.rpcConnectorTcpTransport(rpcAddress, null), configuration) + val client = RPCClient(ArtemisTcpTransport.rpcConnectorTcpTransport(rpcAddress, null), configuration) val connection = client.start(rpcOpsClass, username, password, externalTrace) driverDSL.shutdownManager.registerShutdown { connection.close()