Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/signers.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ module.exports.validateXmlEmbeddedSignature = function (xml, options) {
return ['Signature is missing'];
}

if (options.thumprints){
// Make sure thumprints is an array for the validation
if (options.thumbprints){
// Make sure thumbprints is an array for the validation
options.thumbprints = options.thumbprints instanceof Array ? options.thumbprints : [options.thumbprints];
}

Expand All @@ -79,7 +79,7 @@ module.exports.validateXmlEmbeddedSignature = function (xml, options) {
return certToPEM(options.signingCert);
}

//If there's an embedded signature and thumprints are provided check that
//If there's an embedded signature and thumbprints are provided check that
if (options.thumbprints && options.thumbprints.length > 0) {
var embeddedSignature = keyInfo[0].getElementsByTagNameNS("http://www.w3.org/2000/09/xmldsig#", "X509Certificate");
if (embeddedSignature.length > 0) {
Expand All @@ -92,7 +92,7 @@ module.exports.validateXmlEmbeddedSignature = function (xml, options) {
}
}

// If there's an embedded signature, but no thumprints are supplied, use options.cert
// If there's an embedded signature, but no thumbprints are supplied, use options.cert
// either options.cert or options.thumbprints must be specified so at this point there
// must be an options.cert
return certToPEM(options.signingCert);
Expand Down