From 970303dc2d277a6b86e7fcd9a0655a2417cfdd07 Mon Sep 17 00:00:00 2001 From: Patrick Kuo Date: Tue, 30 Jan 2018 14:23:24 +0000 Subject: [PATCH] fix broken test after merge --- .../networkmanage/hsm/SigningServiceIntegrationTest.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/network-management/src/integration-test/kotlin/com/r3/corda/networkmanage/hsm/SigningServiceIntegrationTest.kt b/network-management/src/integration-test/kotlin/com/r3/corda/networkmanage/hsm/SigningServiceIntegrationTest.kt index d7ff304933..563669ece1 100644 --- a/network-management/src/integration-test/kotlin/com/r3/corda/networkmanage/hsm/SigningServiceIntegrationTest.kt +++ b/network-management/src/integration-test/kotlin/com/r3/corda/networkmanage/hsm/SigningServiceIntegrationTest.kt @@ -126,10 +126,13 @@ class SigningServiceIntegrationTest { } } config.certificatesDirectory.createDirectories() - val trustStore = X509KeyStore.fromFile(config.trustStoreFile, config.trustStorePassword, createNew = true) - trustStore.update { + val networkTrustStorePath = config.certificatesDirectory / "network-root-truststore.jks" + val networkTrustStorePassword = "network-trust-password" + val networkTrustStore = X509KeyStore.fromFile(networkTrustStorePath, networkTrustStorePassword, createNew = true) + networkTrustStore.update { setCertificate(X509Utilities.CORDA_ROOT_CA, rootCaCert) } + val trustStore = X509KeyStore.fromFile(config.trustStoreFile, config.trustStorePassword, createNew = true) val nodeKeyStore = X509KeyStore.fromFile(config.nodeKeystore, config.keyStorePassword, createNew = true) val sslKeyStore = X509KeyStore.fromFile(config.sslKeystore, config.keyStorePassword, createNew = true) config.also { @@ -137,7 +140,7 @@ class SigningServiceIntegrationTest { doReturn(nodeKeyStore).whenever(it).loadNodeKeyStore(any()) doReturn(sslKeyStore).whenever(it).loadSslKeyStore(any()) } - NetworkRegistrationHelper(config, HTTPNetworkRegistrationService(config.compatibilityZoneURL!!)).buildKeystore() + NetworkRegistrationHelper(config, HTTPNetworkRegistrationService(config.compatibilityZoneURL!!), networkTrustStorePath, networkTrustStorePassword).buildKeystore() verify(hsmSigner).sign(any()) } }