Skip to content

Commit

Permalink
Improve OCSP exception handling
Browse files Browse the repository at this point in the history
Add stack trace for error logs when they are generated from internal
error
  • Loading branch information
fmarco76 committed Aug 17, 2023
1 parent eca1957 commit 3973db7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public boolean approve(X509Certificate certificate, ValidityStatus currentStatus
pt = tPt;
}
} catch (IOException e) {
logger.error("CRLLdapValidator: problem extracting key from SKI/AKI");
logger.error("CRLLdapValidator: problem extracting key from SKI/AKI: " + e.getMessage(), e);
}
}
} catch (EBaseException | CertificateException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ protected void initSequence() throws Exception {

initDebug();
initAuditor();
initDBSubsystem();
init();
initPasswordStore();
initSubsystemListeners();
Expand All @@ -114,7 +115,6 @@ protected void initSequence() throws Exception {
initDatabase();

initJssSubsystem();
initDBSubsystem();
initUGSubsystem();
initOIDLoaderSubsystem();
initX500NameSubsystem();
Expand Down Expand Up @@ -192,7 +192,7 @@ private boolean crlCertValid(LDAPStore crlStore, X509Certificate certificate, Va
pt = tPt;
}
} catch (IOException e) {
logger.error("OCSPEngine: problem extracting key from SKI/AKI");
logger.error("OCSPEngine: problem extracting key from SKI/AKI: " + e.getMessage(), e);
}
}
} catch (EBaseException | CertificateException e) {
Expand All @@ -211,7 +211,7 @@ private boolean crlCertValid(LDAPStore crlStore, X509Certificate certificate, Va
return true;
}
} catch (Exception e) {
logger.error("OCSPEngine: crl check error. " + e.getMessage());
logger.error("OCSPEngine: crl check error. " + e.getMessage(), e);
}
logger.info("OCSPEngine: peer certificate not valid");
return false;
Expand Down

0 comments on commit 3973db7

Please sign in to comment.