Skip to content

Commit

Permalink
Clean up log messages in OCSPAdminServlet.getSigningAlgConfig()
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed May 4, 2023
1 parent 827fb86 commit 679c07f
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,18 +458,26 @@ private void getGeneralConfig(HttpServletRequest req,
}

private void getSigningAlgConfig(NameValuePairs params) {
params.put(Constants.PR_DEFAULT_ALGORITHM,
mOCSP.getDefaultAlgorithm());

String defaultAlgorithm = mOCSP.getDefaultAlgorithm();
logger.info("OCSPAdminServlet: Default algorithm: " + defaultAlgorithm);
params.put(Constants.PR_DEFAULT_ALGORITHM, defaultAlgorithm);

String[] algorithms = mOCSP.getOCSPSigningAlgorithms();
StringBuffer algorStr = new StringBuffer();

logger.info("OCSPAdminServlet: Signing algorithms:");
for (int i = 0; i < algorithms.length; i++) {
if (i == 0)
logger.info("OCSPAdminServlet: - " + algorithms[i]);

if (i == 0) {
algorStr.append(algorithms[i]);
else
} else {
algorStr.append(":");
}
algorStr.append(algorithms[i]);
}

params.put(Constants.PR_ALL_ALGORITHMS, algorStr.toString());
}

Expand Down

0 comments on commit 679c07f

Please sign in to comment.