Improvement to client function certimportdir(v9) #775
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.
Describe your changes
Two main changes:
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 occurs when the certificates being imported had been issued from the CA's previous certificate (ie., the CA has been renewed).
To remedy this, I added a "--cacert" option that allows the Operator to provide the CA's previous 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 to ensure the CA can generate the CRL with the same contents. However, this means the Operator will have to perform each certificate import manually.
To import revoked certificates in bulk, then an idea is to have the REASON and TIME value encoded within the filename of each certificate. The code would then extract these revocation details and apply them as each certificate is imported.
The filename convention is: CertName!REASON!TIME, where:
How has this been tested?
A systemtest has been ammended to test these changes:
ant test:runone -Dtest.runone=CaImportCertDirCommandSystemTest
Checklist before requesting a review
NOTE: This pull request is to replace #711