xml-crypto
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -0,0 +0,0 @@ var select = require('xml-crypto').xpath |
@@ -0,0 +0,0 @@ var select = require('xpath').select |
@@ -0,0 +0,0 @@ /* jshint laxcomma: true */ |
@@ -0,0 +0,0 @@ var xpath = require('xpath'); |
@@ -0,0 +0,0 @@ /* jshint laxcomma: true */ |
@@ -481,3 +481,27 @@ var xpath = require('xpath') | ||
var digest = hash.getHash(canonXml) | ||
if (!validateDigestValue(digest, ref.digestValue)) { | ||
if (ref.inclusiveNamespacesPrefixList) { | ||
// fallback: apply InclusiveNamespaces workaround (https://github.com/yaronn/xml-crypto/issues/72) | ||
var prefixList = ref.inclusiveNamespacesPrefixList instanceof Array ? ref.inclusiveNamespacesPrefixList : ref.inclusiveNamespacesPrefixList.split(' '); | ||
var supported_definitions = { | ||
'xs': 'http://www.w3.org/2001/XMLSchema', | ||
'xsi': 'http://www.w3.org/2001/XMLSchema-instance', | ||
'saml': 'urn:oasis:names:tc:SAML:2.0:assertion' | ||
} | ||
prefixList.forEach(function (prefix) { | ||
if (supported_definitions[prefix]) { | ||
elem[0].setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:' + prefix, supported_definitions[prefix]); | ||
} | ||
}); | ||
canonXml = this.getCanonXml(ref.transforms, elem[0], { inclusiveNamespacesPrefixList: ref.inclusiveNamespacesPrefixList }); | ||
digest = hash.getHash(canonXml); | ||
if (digest === ref.digestValue) { | ||
return true; | ||
} | ||
} | ||
} | ||
if (!validateDigestValue(digest, ref.digestValue)) { | ||
@@ -484,0 +508,0 @@ this.validationErrors.push("invalid signature: for uri " + ref.uri + |
@@ -0,0 +0,0 @@ var select = require('xpath').select |
{ | ||
"name": "xml-crypto", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Xml digital signature and encryption library for Node.js", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -0,0 +0,0 @@ ## xml-crypto |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1267
71853