You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticfinalStringDATE_FORMAT_WINSAFE = "yyyy.MM.dd-HH.mm"; // The colon character (:) will cause issued within Windows filenames, so use a period instead.
"Specify an alternate CA certificate file (in PEM). Use this option when importing certificates that were issued by the previous CA certificate. Please note that the supplied certificate is not verified."));
"Revocation details are to be derived from the filename of the certificate. The filename must end with '!<REASON>!<INVALIDITY_TIME>'. The REASON can be the value or label as described in RFC5280 section 5.3.1. "
104
-
+ "INVALIDITY_TIME is formatted as '"+DATE_FORMAT_WINSAFE+"' and assumed to be the local timezone. Note: Filename extensions (ie., '.crt. or '.pem') are not supported. Please also note that any file without "
105
-
+ "revocation details will not be imported."));
106
98
}
107
99
108
100
@Override
@@ -248,59 +240,6 @@ public CommandResult execute(final ParameterContainer parameters) {
248
240
249
241
250
242
for (finalFilefile : files) {
251
-
252
-
// Check if revocation details are to be derived from the filename. Only do this if status is REVOKED
253
-
if ( (status == CertificateConstants.CERT_REVOKED) && parameters.containsKey(REVOKEDETAILS)) {
254
-
// Find the revocation details from the filename. The details are separated with an exclamation (!) character.
255
-
finalString[] sa = file.getName().split("!");
256
-
if (sa.length <3) {
257
-
log.error("ERROR: The revocation details are not found in filename '"+file.getName()+"'. Ignoring this file.");
258
-
results.add( Result.GENERAL_IMPORT_ERROR);
259
-
continue;
260
-
} else {
261
-
// Process the REASON from 2nd last string in array
log.error("ERROR: '" + sRevTime + "' was not a valid revocation time. Use this time format '"+DATE_FORMAT_WINSAFE+"'. Ignoring this file '"+file.getName()+"'.");
assertEquals("Certificate revocation reason was incorrectly imported.", RevocationReasons.CERTIFICATEHOLD.getDatabaseValue(),
210
-
certificateStatus.revocationReason);
211
-
assertEquals("Certificate revocation date was incorrectly imported.", newSimpleDateFormat(CaImportCertDirCommand.DATE_FORMAT_WINSAFE).parse("2022.07.08-15.49"),
assertEquals("Certificate revocation reason was incorrectly imported.", RevocationReasons.AFFILIATIONCHANGED.getDatabaseValue(),
228
-
certificateStatus.revocationReason);
229
-
assertEquals("Certificate revocation date was incorrectly imported.", newSimpleDateFormat(CaImportCertDirCommand.DATE_FORMAT_WINSAFE).parse("2023.08.21-05.26"),
assertEquals("Certificate revocation reason was incorrectly imported.", RevocationReasons.CESSATIONOFOPERATION.getDatabaseValue(),
246
-
certificateStatus.revocationReason);
247
-
assertEquals("Certificate revocation date was incorrectly imported.", newSimpleDateFormat(CaImportCertDirCommand.DATE_FORMAT_WINSAFE).parse("2021.02.28-0.01"),
0 commit comments