From 1c58af1d5fc1f3ded8f6360b3a899bf87297c21a Mon Sep 17 00:00:00 2001 From: Patrick Kuo Date: Fri, 30 Sep 2016 15:49:37 +0100 Subject: [PATCH] Removed reference to the root ca and retrieve root certificate from certificate chain instead --- netpermission/src/main/kotlin/com/r3corda/netpermission/Main.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netpermission/src/main/kotlin/com/r3corda/netpermission/Main.kt b/netpermission/src/main/kotlin/com/r3corda/netpermission/Main.kt index 22308cc464..9771201f81 100644 --- a/netpermission/src/main/kotlin/com/r3corda/netpermission/Main.kt +++ b/netpermission/src/main/kotlin/com/r3corda/netpermission/Main.kt @@ -96,7 +96,7 @@ fun main(args: Array) { val keyPassword = valueOf(ParamsSpec.caKeyPassword) val keystore = X509Utilities.loadKeyStore(Paths.get(valueOf(ParamsSpec.keystorePath)).normalize(), storePassword) val intermediateCACertAndKey = X509Utilities.loadCertificateAndKey(keystore, keyPassword, X509Utilities.CORDA_INTERMEDIATE_CA_PRIVATE_KEY) - val rootCA = keystore.getCertificate(X509Utilities.CORDA_ROOT_CA_PRIVATE_KEY) + val rootCA = keystore.getCertificateChain(X509Utilities.CORDA_INTERMEDIATE_CA_PRIVATE_KEY).last() // TODO: Create a proper request storage using database or other storage technology. val service = CertificateSigningService(intermediateCACertAndKey, rootCA, InMemoryCertificationRequestStorage())