ENT-992: Introducing the CRR submission tool (#633)

* Introducing the CRR submission tool

* Addressing review comments

* Addressing review comments - round 2 - Redesign of the tool.

* Fixing messages
This commit is contained in:
Michal Kit
2018-04-03 08:33:22 +01:00
committed by GitHub
parent 9c07e67100
commit 625d0447aa
17 changed files with 302 additions and 77 deletions

View File

@ -15,9 +15,15 @@ data class CertificateRevocationRequest(val certificateSerialNumber: BigInteger?
val legalName: CordaX500Name? = null,
val reason: CRLReason,
val reporter: String) {
init {
require(certificateSerialNumber != null || csrRequestId != null || legalName != null) {
"At least one of the following needs to be specified: certificateSerialNumber, csrRequestId, legalName."
companion object {
fun validateOptional(certificateSerialNumber: BigInteger?, csrRequestId: String?, legalName: CordaX500Name?) {
require(certificateSerialNumber != null || csrRequestId != null || legalName != null) {
"At least one of the following needs to be specified: certificateSerialNumber, csrRequestId, legalName."
}
}
}
init {
validateOptional(certificateSerialNumber, csrRequestId, legalName)
}
}