Fixed Doorman dependencies and compilation errors following rebase from OS.

This commit is contained in:
josecoll 2017-12-12 14:20:59 +00:00
parent cc770e1145
commit 7eabee1241
7 changed files with 10 additions and 15 deletions

View File

@ -50,15 +50,11 @@ task integrationTest(type: Test) {
dependencies { dependencies {
compile fileTree(dir: 'libs', include: '*.jar') compile fileTree(dir: 'libs', include: '*.jar')
compile project(':node-api')
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "net.corda:corda-node-api:$corda_release_version"
// TODO remove this when AMQP P2P serialization context is supported.
compile "net.corda:corda-rpc:$corda_release_version"
testCompile "net.corda:corda-node-driver:$corda_release_version"
testCompile "net.corda:corda-test-common:$corda_release_version"
// Log4J: logging framework (with SLF4J bindings) // Log4J: logging framework (with SLF4J bindings)
compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j_version}" compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j_version}"
compile "org.apache.logging.log4j:log4j-core:${log4j_version}" compile "org.apache.logging.log4j:log4j-core:${log4j_version}"

View File

@ -6,7 +6,7 @@ import com.typesafe.config.ConfigParseOptions
import net.corda.core.internal.div import net.corda.core.internal.div
import net.corda.core.internal.isRegularFile import net.corda.core.internal.isRegularFile
import net.corda.core.utilities.seconds import net.corda.core.utilities.seconds
import net.corda.nodeapi.config.parseAs import net.corda.nodeapi.internal.config.parseAs
import java.nio.file.Path import java.nio.file.Path
import java.nio.file.Paths import java.nio.file.Paths
import java.util.* import java.util.*

View File

@ -5,13 +5,13 @@ import com.r3.corda.networkmanage.common.persistence.*
import com.r3.corda.networkmanage.common.persistence.CertificationRequestStorage.Companion.DOORMAN_SIGNATURE import com.r3.corda.networkmanage.common.persistence.CertificationRequestStorage.Companion.DOORMAN_SIGNATURE
import com.r3.corda.networkmanage.common.signer.NetworkMapSigner import com.r3.corda.networkmanage.common.signer.NetworkMapSigner
import com.r3.corda.networkmanage.common.utils.ShowHelpException import com.r3.corda.networkmanage.common.utils.ShowHelpException
import com.r3.corda.networkmanage.common.utils.toX509Certificate
import com.r3.corda.networkmanage.doorman.signer.DefaultCsrHandler import com.r3.corda.networkmanage.doorman.signer.DefaultCsrHandler
import com.r3.corda.networkmanage.doorman.signer.JiraCsrHandler import com.r3.corda.networkmanage.doorman.signer.JiraCsrHandler
import com.r3.corda.networkmanage.doorman.signer.LocalSigner import com.r3.corda.networkmanage.doorman.signer.LocalSigner
import com.r3.corda.networkmanage.doorman.webservice.MonitoringWebService import com.r3.corda.networkmanage.doorman.webservice.MonitoringWebService
import com.r3.corda.networkmanage.doorman.webservice.NodeInfoWebService import com.r3.corda.networkmanage.doorman.webservice.NodeInfoWebService
import com.r3.corda.networkmanage.doorman.webservice.RegistrationWebService import com.r3.corda.networkmanage.doorman.webservice.RegistrationWebService
import net.corda.client.rpc.internal.KryoClientSerializationScheme
import net.corda.core.crypto.Crypto import net.corda.core.crypto.Crypto
import net.corda.core.identity.CordaX500Name import net.corda.core.identity.CordaX500Name
import net.corda.core.internal.createDirectories import net.corda.core.internal.createDirectories
@ -192,7 +192,7 @@ fun generateRootKeyPair(rootStorePath: Path, rootKeystorePass: String?, rootPriv
rootStore.save(rootStorePath, rootKeystorePassword) rootStore.save(rootStorePath, rootKeystorePassword)
// TODO: remove this once we create truststore for nodes. // TODO: remove this once we create truststore for nodes.
X509Utilities.saveCertificateAsPEMFile(selfSignCert, rootStorePath.parent / "rootcert.pem") X509Utilities.saveCertificateAsPEMFile(selfSignCert.toX509Certificate(), rootStorePath.parent / "rootcert.pem")
println("Root CA keypair and certificate stored in ${rootStorePath.toAbsolutePath()}.") println("Root CA keypair and certificate stored in ${rootStorePath.toAbsolutePath()}.")
println(loadKeyStore(rootStorePath, rootKeystorePassword).getCertificate(X509Utilities.CORDA_ROOT_CA).publicKey) println(loadKeyStore(rootStorePath, rootKeystorePassword).getCertificate(X509Utilities.CORDA_ROOT_CA).publicKey)
@ -304,7 +304,6 @@ private fun initialiseSerialization() {
val context = KRYO_P2P_CONTEXT val context = KRYO_P2P_CONTEXT
nodeSerializationEnv = SerializationEnvironmentImpl( nodeSerializationEnv = SerializationEnvironmentImpl(
SerializationFactoryImpl().apply { SerializationFactoryImpl().apply {
registerScheme(KryoClientSerializationScheme())
registerScheme(AMQPClientSerializationScheme()) registerScheme(AMQPClientSerializationScheme())
}, },
context) context)

View File

@ -7,7 +7,7 @@ import net.corda.core.identity.Party
import net.corda.core.internal.exists import net.corda.core.internal.exists
import net.corda.core.utilities.days import net.corda.core.utilities.days
import net.corda.core.utilities.parsePublicKeyBase58 import net.corda.core.utilities.parsePublicKeyBase58
import net.corda.nodeapi.config.parseAs import net.corda.nodeapi.internal.config.parseAs
import net.corda.nodeapi.internal.NetworkParameters import net.corda.nodeapi.internal.NetworkParameters
import net.corda.nodeapi.internal.NotaryInfo import net.corda.nodeapi.internal.NotaryInfo
import java.nio.file.Path import java.nio.file.Path

View File

@ -33,7 +33,7 @@ class LocalSigner(private val caKeyPair: KeyPair, private val caCertPath: Array<
val nameConstraints = NameConstraints( val nameConstraints = NameConstraints(
arrayOf(GeneralSubtree(GeneralName(GeneralName.directoryName, request.subject))), arrayOf(GeneralSubtree(GeneralName(GeneralName.directoryName, request.subject))),
arrayOf()) arrayOf())
val clientCertificate = X509Utilities.createCertificate(CertificateType.CLIENT_CA, val clientCertificate = X509Utilities.createCertificate(CertificateType.NODE_CA,
caCertPath.first().toX509CertHolder(), caCertPath.first().toX509CertHolder(),
caKeyPair, caKeyPair,
CordaX500Name.parse(request.subject.toString()).copy(commonName = X509Utilities.CORDA_CLIENT_CA_CN), CordaX500Name.parse(request.subject.toString()).copy(commonName = X509Utilities.CORDA_CLIENT_CA_CN),

View File

@ -13,7 +13,7 @@ import com.r3.corda.networkmanage.hsm.configuration.Parameters.Companion.DEFAULT
import com.typesafe.config.ConfigFactory import com.typesafe.config.ConfigFactory
import com.typesafe.config.ConfigParseOptions import com.typesafe.config.ConfigParseOptions
import net.corda.core.internal.div import net.corda.core.internal.div
import net.corda.nodeapi.config.parseAs import net.corda.nodeapi.internal.config.parseAs
import net.corda.nodeapi.internal.crypto.X509Utilities import net.corda.nodeapi.internal.crypto.X509Utilities
import net.corda.nodeapi.internal.persistence.DatabaseConfig import net.corda.nodeapi.internal.persistence.DatabaseConfig
import java.nio.file.Path import java.nio.file.Path

View File

@ -181,7 +181,7 @@ object X509Utilities {
val nameConstraints = NameConstraints(arrayOf(GeneralSubtree(GeneralName(GeneralName.directoryName, CordaX500Name.parse(jcaRequest.subject.toString()).copy(commonName = null).x500Name))), arrayOf()) val nameConstraints = NameConstraints(arrayOf(GeneralSubtree(GeneralName(GeneralName.directoryName, CordaX500Name.parse(jcaRequest.subject.toString()).copy(commonName = null).x500Name))), arrayOf())
val issuerCertificate = caCertAndKey.certificate val issuerCertificate = caCertAndKey.certificate
val issuerKeyPair = caCertAndKey.keyPair val issuerKeyPair = caCertAndKey.keyPair
val certificateType = CertificateType.CLIENT_CA val certificateType = CertificateType.NODE_CA
val validityWindow = getCertificateValidityWindow(0, validDays, issuerCertificate.notBefore, issuerCertificate.notAfter) val validityWindow = getCertificateValidityWindow(0, validDays, issuerCertificate.notBefore, issuerCertificate.notAfter)
val serial = BigInteger.valueOf(random63BitValue(provider)) val serial = BigInteger.valueOf(random63BitValue(provider))
val subject = CordaX500Name.parse(jcaRequest.subject.toString()).copy(commonName = X509Utilities.CORDA_CLIENT_CA_CN).x500Name val subject = CordaX500Name.parse(jcaRequest.subject.toString()).copy(commonName = X509Utilities.CORDA_CLIENT_CA_CN).x500Name