aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/knowcenter/wag/egov
diff options
context:
space:
mode:
authortknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-10-20 09:57:33 +0000
committertknall <tknall@7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c>2009-10-20 09:57:33 +0000
commit8a16641b47e9908d6362e07244cbad972c3a1730 (patch)
treec8c7ab530d733e6907e7c21d4d451bc132df966d /src/main/java/at/knowcenter/wag/egov
parent042d3244bdaae167a6f3a7a53621e3a52346cd9f (diff)
downloadpdf-as-3-8a16641b47e9908d6362e07244cbad972c3a1730.tar.gz
pdf-as-3-8a16641b47e9908d6362e07244cbad972c3a1730.tar.bz2
pdf-as-3-8a16641b47e9908d6362e07244cbad972c3a1730.zip
Parsing of CreateXMLSignatureResponse improved (needed for SHA256 based signatures).REL-3.0.9-20090929@374
git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@347 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c
Diffstat (limited to 'src/main/java/at/knowcenter/wag/egov')
-rw-r--r--src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/MOCCAHelper.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/MOCCAHelper.java b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/MOCCAHelper.java
index 7e32230..f13b5af 100644
--- a/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/MOCCAHelper.java
+++ b/src/main/java/at/knowcenter/wag/egov/egiz/sig/connectors/mocca/MOCCAHelper.java
@@ -74,9 +74,13 @@ public final class MOCCAHelper {
// SignatureValue
String sig_val = null;
- Matcher signatureValueMatcher = Pattern.compile("<(\\w+:)?SignatureValue( Id=\"[\\w-]+\")?>\\s*(.*)\\s*</(\\w+:)?SignatureValue>").matcher(xmlResponse);
+ Pattern signatureValuePattern = Pattern.compile("<(\\w+:)?SignatureValue( Id=\"[\\w-]+\")?>\\s*(.*)\\s*</(\\w+:)?SignatureValue>", Pattern.DOTALL);
+ Matcher signatureValueMatcher = signatureValuePattern.matcher(xmlResponse);
if (signatureValueMatcher.find()) {
sig_val = signatureValueMatcher.group(3);
+ if (sig_val != null) {
+ sig_val = sig_val.replaceAll("\\s", "");
+ }
}
log.debug("sig_val = " + sig_val);