From aca429937af58e9f95c53e45e293d17c2bb7ce09 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Mon, 19 Aug 2019 15:33:22 +0200 Subject: SignatureVerifier: Log incoming request to debug --- src/main/java/at/gv/egiz/moazs/backend/SignatureVerifier.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') 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 { @Override public void accept(byte[] signedXMLdocument) { + debug(signedXMLdocument); + try { var response = service.verifyXMLSignature(signedXMLdocument, trustProfile); @@ -101,6 +104,14 @@ public class SignatureVerifier implements Consumer { } + 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: "); -- cgit v1.2.3