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())