aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/at/gv/egiz/moazs/backend/SignatureVerifier.java11
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: ");