diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-08-19 15:33:22 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-08-19 15:33:22 +0200 |
commit | aca429937af58e9f95c53e45e293d17c2bb7ce09 (patch) | |
tree | b757203c7c697773f7c4e1595bee9027d6e6849b /src | |
parent | 63baa41b1ea5ce6f2f9a1513522f7ad54ed0ceab (diff) | |
download | moa-zs-aca429937af58e9f95c53e45e293d17c2bb7ce09.tar.gz moa-zs-aca429937af58e9f95c53e45e293d17c2bb7ce09.tar.bz2 moa-zs-aca429937af58e9f95c53e45e293d17c2bb7ce09.zip |
SignatureVerifier: Log incoming request to debug
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/backend/SignatureVerifier.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/backend/SignatureVerifier.java b/src/main/java/at/gv/egiz/moazs/backend/SignatureVerifier.java index a19c06a..27e7e7e 100644 --- a/src/main/java/at/gv/egiz/moazs/backend/SignatureVerifier.java +++ b/src/main/java/at/gv/egiz/moazs/backend/SignatureVerifier.java @@ -6,6 +6,7 @@ import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MOASigServ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.nio.charset.StandardCharsets; import java.util.function.Consumer; import static at.gv.egiz.moazs.MoaZSException.moaZSException; @@ -52,6 +53,8 @@ public class SignatureVerifier implements Consumer<byte[]> { @Override public void accept(byte[] signedXMLdocument) { + debug(signedXMLdocument); + try { var response = service.verifyXMLSignature(signedXMLdocument, trustProfile); @@ -101,6 +104,14 @@ public class SignatureVerifier implements Consumer<byte[]> { } + private void debug(byte[] signedXMLdocument) { + if (log.isDebugEnabled()) { + log.info("Verifying the following byte[]: \n--------------------\n{}\n--------------------\n", + new String(signedXMLdocument, StandardCharsets.UTF_8)); + + } + } + public static void debug(IXMLSignatureVerificationResponse response) { if (log.isDebugEnabled()) { var builder = new StringBuilder("Response: "); |