Merged in pat-remove-rootCA-ref (pull request #11)

Removed reference to the root ca and retrieve root certificate from certificate chain instead
This commit is contained in:
Patrick Kuo 2016-10-03 13:37:19 +01:00
commit 79e5d80937

View File

@ -96,7 +96,7 @@ fun main(args: Array<String>) {
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())