mirror of
https://github.com/corda/corda.git
synced 2025-04-13 22:23:31 +00:00
Merge pull request #1370 from corda/fixes/certificateStoreStubs
OS -> ENT merge: fixing a bug in certificate store stubs.
This commit is contained in:
commit
1032b44f18
@ -72,10 +72,10 @@ class BridgeSmokeTest {
|
||||
val artemisConfig = CertificateStoreStubs.P2P.withBaseDirectory(baseDirectory)
|
||||
|
||||
artemisConfig.createBridgeKeyStores(DUMMY_BANK_A_NAME)
|
||||
copyBridgeResource("corda-firewall.jar")
|
||||
copyBridgeResource("firewall.conf")
|
||||
copyBridgeResource("corda-firewall.jar", baseDirectory)
|
||||
copyBridgeResource("firewall.conf", baseDirectory)
|
||||
createNetworkParams(baseDirectory)
|
||||
val (artemisServer, artemisClient) = createArtemis()
|
||||
val (artemisServer, artemisClient) = createArtemis(baseDirectory, baseDirectory / "certificates", artemisConfig)
|
||||
val zkServer = TestingServer(11105, false)
|
||||
try {
|
||||
installBridgeControlResponder(artemisClient)
|
||||
@ -89,13 +89,12 @@ class BridgeSmokeTest {
|
||||
}
|
||||
}
|
||||
|
||||
private fun copyBridgeResource(resourceName: String) {
|
||||
val testDir = tempFolder.root.toPath()
|
||||
// Find the finance jar file for the smoke tests of this module
|
||||
private fun copyBridgeResource(resourceName: String, baseDirectory: Path) {
|
||||
// Find the firewall jar file for the smoke tests of this module
|
||||
val bridgeJar = Paths.get("build", "resources/smokeTest/net/corda/bridge/smoketest").list {
|
||||
it.filter { resourceName in it.toString() }.toList().single()
|
||||
}
|
||||
bridgeJar.copyToDirectory(testDir)
|
||||
bridgeJar.copyToDirectory(baseDirectory)
|
||||
}
|
||||
|
||||
private fun createNetworkParams(baseDirectory: Path) {
|
||||
@ -200,18 +199,16 @@ class BridgeSmokeTest {
|
||||
}
|
||||
}
|
||||
|
||||
private fun createArtemis(): Pair<ArtemisMessagingServer, ArtemisMessagingClient> {
|
||||
val baseDirectory = tempFolder.root.toPath()
|
||||
val certificatesDirectory = baseDirectory / "certificates"
|
||||
val p2pSslConfiguration = CertificateStoreStubs.P2P.withCertificatesDirectory(certificatesDirectory)
|
||||
private fun createArtemis(baseDirectory: Path, certificatesDirectory: Path, p2pSslConfiguration: MutualSslConfiguration): Pair<ArtemisMessagingServer, ArtemisMessagingClient> {
|
||||
|
||||
val signingCertificateStore = CertificateStoreStubs.Signing.withCertificatesDirectory(certificatesDirectory)
|
||||
|
||||
val artemisConfig = rigorousMock<AbstractNodeConfiguration>().also {
|
||||
doReturn(baseDirectory).whenever(it).baseDirectory
|
||||
doReturn(certificatesDirectory).whenever(it).certificatesDirectory
|
||||
doReturn(ALICE_NAME).whenever(it).myLegalName
|
||||
doReturn(p2pSslConfiguration).whenever(it).p2pSslOptions
|
||||
doReturn(signingCertificateStore).whenever(it).signingCertificateStore
|
||||
doReturn(p2pSslConfiguration).whenever(it).p2pSslOptions
|
||||
doReturn(NetworkHostAndPort("localhost", 11005)).whenever(it).p2pAddress
|
||||
doReturn(null).whenever(it).jmxMonitoringHttpPort
|
||||
doReturn(EnterpriseConfiguration(MutualExclusionConfiguration(false, "", 20000, 40000), externalBridge = true)).whenever(it).enterpriseConfiguration
|
||||
|
@ -235,6 +235,7 @@ allprojects {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven { url "$artifactory_contextUrl/corda-dependencies" }
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url "$artifactory_contextUrl/corda-releases" } // cordform-common
|
||||
if (project.hasProperty("mavenOracleUsername") && project.hasProperty("mavenOraclePassword")) {
|
||||
@ -296,12 +297,6 @@ allprojects {
|
||||
if (!JavaVersion.current().java8Compatible)
|
||||
throw new GradleException("Corda requires Java 8, please upgrade to at least 1.8.0_$java8_minUpdateVersion")
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
// Required for building out the fat JAR.
|
||||
dependencies {
|
||||
compile project(':node')
|
||||
|
@ -3,15 +3,6 @@ apply plugin: 'application'
|
||||
apply plugin: 'net.corda.plugins.cordformation'
|
||||
apply plugin: 'net.corda.plugins.quasar-utils'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
maven {
|
||||
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
integrationTestCompile.extendsFrom testCompile
|
||||
integrationTestRuntime.extendsFrom testRuntime
|
||||
|
@ -3,15 +3,6 @@ version '1.0-SNAPSHOT'
|
||||
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
jcenter()
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.suppressWarnings = true
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ class CertificateStoreStubs {
|
||||
@JvmStatic
|
||||
fun withBaseDirectory(baseDirectory: Path, certificatesDirectoryName: String = DEFAULT_CERTIFICATES_DIRECTORY_NAME, keyStoreFileName: String = KeyStore.DEFAULT_STORE_FILE_NAME, keyStorePassword: String = KeyStore.DEFAULT_STORE_PASSWORD, trustStoreFileName: String = TrustStore.DEFAULT_STORE_FILE_NAME, trustStorePassword: String = TrustStore.DEFAULT_STORE_PASSWORD): MutualSslConfiguration {
|
||||
|
||||
return withCertificatesDirectory(baseDirectory / certificatesDirectoryName, keyStorePassword, trustStorePassword, keyStoreFileName, trustStoreFileName)
|
||||
return withCertificatesDirectory(baseDirectory / certificatesDirectoryName, keyStoreFileName, keyStorePassword, trustStoreFileName, trustStorePassword)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,3 @@
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
apply plugin: 'application'
|
||||
|
@ -11,15 +11,6 @@ configurations {
|
||||
runtimeArtifacts.extendsFrom runtime
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
jcenter()
|
||||
}
|
||||
|
||||
// Force the Caplet to target Java 6. This ensures that running 'java -jar explorer.jar' on any Java 6 VM upwards
|
||||
// will get as far as the Capsule version checks, meaning that if your JVM is too old, you will at least get
|
||||
// a sensible error message telling you what to do rather than a bytecode version exception that doesn't.
|
||||
|
Loading…
x
Reference in New Issue
Block a user