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
"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."));
98
+
}
96
99
97
100
@Override
98
101
publicStringgetMainCommand() {
@@ -115,6 +118,7 @@ public CommandResult execute(final ParameterContainer parameters) {
if ( (certsInFile == null) || (certsInFile.size()<1)) {
192
+
log.error("CA Certificate file '" + caCertFile + "' could not be processed. Please check the file.");
193
+
returnCommandResult.CLI_FAILURE;
194
+
}
195
+
if ( certsInFile.size()>1) {
196
+
log.warn("CA Certificate file '" + caCertFile + "' contains more than one certificate. Assuming the first certificate.");
197
+
}
198
+
// Assume the first certificate, in case more than one provided.
199
+
cacert = certsInFile.get(0);
200
+
log.warn("The certificate for the CA has been overidden. This certificate has not been verified. Use at your own risk. Certificate details: "+cacert.toString());
Copy file name to clipboardExpand all lines: modules/systemtests/src-test/org/ejbca/ui/cli/ca/CaImportCertDirCommandSystemTest.java
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,7 @@
59
59
60
60
importstaticorg.junit.Assert.assertEquals;
61
61
importstaticorg.junit.Assert.assertNotNull;
62
+
importstaticorg.junit.Assert.assertNull;
62
63
63
64
/**
64
65
* @version $Id$
@@ -191,4 +192,41 @@ public void testImportRevokedWithReasonAndTime() throws AuthorizationDeniedExcep
191
192
assertEquals("Certificate revocation date was incorrectly imported.", newSimpleDateFormat(CaImportCertDirCommand.DATE_FORMAT).parse("2015.05.04-10:15"),
0 commit comments