diff options
author | tlenz <thomas.lenz@egiz.gv.at> | 2017-11-20 08:45:11 +0100 |
---|---|---|
committer | tlenz <thomas.lenz@egiz.gv.at> | 2017-11-20 08:45:11 +0100 |
commit | 887d2444a1e75b0ff5f1d63127f71570c24f921d (patch) | |
tree | 39c06c9c3b0c1166a2475d4855e8ebcae8cfdee1 /moaSig/moa-sig-lib | |
parent | e1725f9162fb687b1cc38ac8a40d952d71fae2fa (diff) | |
download | moa-sig-887d2444a1e75b0ff5f1d63127f71570c24f921d.tar.gz moa-sig-887d2444a1e75b0ff5f1d63127f71570c24f921d.tar.bz2 moa-sig-887d2444a1e75b0ff5f1d63127f71570c24f921d.zip |
update log-levels for PAdES signature verification
Diffstat (limited to 'moaSig/moa-sig-lib')
2 files changed, 15 insertions, 10 deletions
diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java index e68092f..d3ad086 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java @@ -244,10 +244,12 @@ public class XMLSignatureVerificationInvoker { adesResults = AdESResultUtils.getAdESResult(result.getFormVerificationResult()); - if (adesResults != null) { - Iterator adesIterator = adesResults.iterator(); - while (adesIterator.hasNext()) { - Logger.info("ADES Formresults: " + adesIterator.next().toString()); + if (Logger.isDebugEnabled()) { + if (adesResults != null) { + Iterator adesIterator = adesResults.iterator(); + while (adesIterator.hasNext()) { + Logger.debug("ADES Formresults: " + adesIterator.next().toString()); + } } } @@ -255,11 +257,12 @@ public class XMLSignatureVerificationInvoker { try { //Logger.info("Extended Validation Report: " + result.getName()); - Logger.info("Extended Validation Code: " + result.getResultCode().toString()); - Logger.info("Extended Validation Info: " + result.getInfo()); + Logger.debug("Extended Validation Code: " + result.getResultCode().toString()); + Logger.debug("Extended Validation Info: " + result.getInfo()); extCheckResult = AdESResultUtils.getExtendedResult(result.getResultCode()); responseBuilder.setExtendedCertificateCheckResult(extCheckResult); + } catch (NullPointerException e) { Logger.info("No extendend validation result available."); } diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/util/AdESResultUtils.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/util/AdESResultUtils.java index a28088a..3ac706e 100644 --- a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/util/AdESResultUtils.java +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/util/AdESResultUtils.java @@ -193,28 +193,30 @@ public class AdESResultUtils { public static void checkSubResult(AdESVerificationResult subResult, String level, List adesList) { if (subResult != null) { - Logger.info("Checking Level: " + level); + Logger.debug("Checking Level: " + level); try { AdESFormResultsImpl adESFormResultsImpl = new AdESFormResultsImpl(); adESFormResultsImpl.setCode(subResult.getResultCode()); - Logger.info("RESULT: " + String.valueOf(subResult.getResultCode())); + Logger.debug("RESULT: " + String.valueOf(subResult.getResultCode())); adESFormResultsImpl.setInfo(subResult.getInfo()); adESFormResultsImpl.setName(level); adesList.add(adESFormResultsImpl); } catch (NullPointerException e) { Logger.warn("Catching NullPointer Exception, of invalid Form Results", e); + } } else { Logger.info("Subresult Level: " + level + " not available"); + } } public static void checkSubResult(SignatureVerificationResult subResult, String level, List adesList) throws ConfigurationException { if (subResult != null) { - Logger.info("Checking Level: " + level); + Logger.debug("Checking Level: " + level); try { AdESFormResultsImpl adESFormResultsImpl = new AdESFormResultsImpl(); @@ -226,7 +228,7 @@ public class AdESResultUtils { } else { adESFormResultsImpl.setCode(SignatureVerificationResult.INDETERMINATE); } - Logger.info("RESULT: " + resultCode.toString()); + Logger.debug("RESULT: " + resultCode.toString()); adESFormResultsImpl.setInfo(subResult.getInfo()); adESFormResultsImpl.setName(level); |