Enhancement to the CLI: CaImportCertDirCommand.java #711
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When importing certificates into a newly migrated CA, the code performs a certificate verification based upon the CA's certificate that is stored in the DB. A problem with this is when the certificates being imported had been issued from the CA's previous certificate. An example CA that is impacted by this is a CSCA used for ePassports. These CA are renewed often, and the end-entity certificate have a long validity.
To remedy this, I added a "--cacert" option that allows the Operator to provide an alternate CA certificate that will then be used to verify the certificate being imported.
When importing revoked certificates, the Operator should supply the revocation REASON and INVALIDITY_TIME. If you have a lot of revoked certificates to import, then a better option is required.
One idea is to have the REASON and TIME value encoded within the filename of each certificate, and the code then extracts these revocation details. The filename format being: CertName_REASON_TIME
REASON is the reason code value or the name. eg., For suspended certs, use either "6" or "CERTIFICATEHOLD"
TIME format is YYYY.MM.DD-hh:mm
Checklist before requesting a review