From d63c9daebb9240e759c352a41d9d86718f2f306e Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Fri, 2 Aug 2019 10:13:16 +0200 Subject: patch xpath expression that selects dsig:Signature - Problem: xpath that determines dsig:Signature element only selects first-order child elements. - Fix: Add "//"-prefix to xpath expression, which "selects nodes in the document from the current node that match the selection no matter where they are" [1] [1] https://www.w3schools.com/xml/xpath_syntax.asp --- .../modules/sigverify/moasig/impl/SignatureVerificationService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'eaaf_modules/eaaf_module_moa-sig/src/main/java/at') diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureVerificationService.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureVerificationService.java index ca20ce0f..02f5f12a 100644 --- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureVerificationService.java +++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureVerificationService.java @@ -217,7 +217,7 @@ public class SignatureVerificationService extends AbstractSignatureService imple // specify the signature location final Element verifySignatureLocationElem = requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureLocation"); verifiySignatureInfoElem.appendChild(verifySignatureLocationElem); - final Node signatureLocation = requestDoc_.createTextNode(DSIG + "Signature"); + final Node signatureLocation = requestDoc_.createTextNode("//" + DSIG + "Signature"); verifySignatureLocationElem.appendChild(signatureLocation); // signature manifest params -- cgit v1.2.3