Skip to content

Commit

Permalink
Fixed misleading error message on duplicate cert in HSM.
Browse files Browse the repository at this point in the history
The ConfigurationUtils.handleCerts() has been modified to log the
actual exception instead of showing the "deleteCert" operation
which may not be executed yet.

https://fedorahosted.org/pki/ticket/2457
  • Loading branch information
edewata committed Jan 5, 2017
1 parent 5ec9701 commit 48090b0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3240,7 +3240,7 @@ public static void handleCerts(Cert cert) throws Exception {
deleteCert(tokenname, nickname);
}
} catch (Exception e) {
CMS.debug("ConfigurationUtils: update (remote): deleteCert Exception=" + e.toString());
CMS.debug(e);
}

CMS.debug("handleCerts(): importing new cert");
Expand Down Expand Up @@ -3309,8 +3309,8 @@ public static void handleCerts(Cert cert) throws Exception {
if (findCertificate(tokenname, nickname)) {
deleteCert(tokenname, nickname);
}
} catch (Exception ee) {
CMS.debug("handleCerts(): deleteCert Exception=" + ee.toString());
} catch (Exception e) {
CMS.debug(e);
}

CMS.debug("handleCerts(): importing new cert");
Expand Down

0 comments on commit 48090b0

Please sign in to comment.