verify with NETWORK_PARAMETERS role and test (#6628)

This commit is contained in:
Nikolett Nagy
2020-09-02 09:48:01 +01:00
committed by GitHub
parent b1e2d6a48c
commit 6113cbbd39
4 changed files with 40 additions and 4 deletions

View File

@ -77,6 +77,16 @@ fun createDevNetworkMapCa(rootCa: CertificateAndKeyPair = DEV_ROOT_CA): Certific
return CertificateAndKeyPair(cert, keyPair)
}
fun createDevNetworkParametersCa(rootCa: CertificateAndKeyPair = DEV_ROOT_CA): CertificateAndKeyPair {
val keyPair = generateKeyPair()
val cert = X509Utilities.createCertificate(
CertificateType.NETWORK_PARAMETERS,
rootCa.certificate,
rootCa.keyPair,
X500Principal("CN=Network Parameters,O=R3 Ltd,L=London,C=GB"),
keyPair.public)
return CertificateAndKeyPair(cert, keyPair)
}
/**
* Create a dev node CA cert, as a sub-cert of the given [intermediateCa], and matching key pair using the given
* [CordaX500Name] as the cert subject.