From 8f576a8140b303247272e16c4217d10aca3a3026 Mon Sep 17 00:00:00 2001 From: Chris Mordue Date: Wed, 13 Dec 2017 17:12:47 -0300 Subject: [PATCH 1/2] Added more default namespace prefix combinations from https://www.w3.org/TR/xmldsig-core2/#sec-Versions --- lib/signed-xml.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/signed-xml.js b/lib/signed-xml.js index c579b28c..aabf974b 100644 --- a/lib/signed-xml.js +++ b/lib/signed-xml.js @@ -245,7 +245,10 @@ SignedXml.SignatureAlgorithms = { } SignedXml.defaultNsForPrefix = { - ds: 'http://www.w3.org/2000/09/xmldsig#' + ds: 'http://www.w3.org/2000/09/xmldsig#', + dsig: 'http://www.w3.org/2000/09/xmldsig#', + dsig11: 'http://www.w3.org/2009/xmldsig11#', + dsig2: 'http://www.w3.org/2010/xmldsig2#' }; SignedXml.prototype.checkSignature = function(xml) { From bff603c6563a991661342cbb47c2a34199ecca02 Mon Sep 17 00:00:00 2001 From: Chris Mordue Date: Tue, 19 Dec 2017 11:26:10 -0300 Subject: [PATCH 2/2] removed dsig2 default namespace to not risk compatibility issues --- lib/signed-xml.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/signed-xml.js b/lib/signed-xml.js index aabf974b..e05a3405 100644 --- a/lib/signed-xml.js +++ b/lib/signed-xml.js @@ -247,8 +247,7 @@ SignedXml.SignatureAlgorithms = { SignedXml.defaultNsForPrefix = { ds: 'http://www.w3.org/2000/09/xmldsig#', dsig: 'http://www.w3.org/2000/09/xmldsig#', - dsig11: 'http://www.w3.org/2009/xmldsig11#', - dsig2: 'http://www.w3.org/2010/xmldsig2#' + dsig11: 'http://www.w3.org/2009/xmldsig11#' }; SignedXml.prototype.checkSignature = function(xml) {