diff --git a/lib/signed-xml.js b/lib/signed-xml.js index 1b511d3d..b02ff078 100644 --- a/lib/signed-xml.js +++ b/lib/signed-xml.js @@ -713,7 +713,7 @@ SignedXml.prototype.computeSignature = function(xml, opts, callback) { prefix = opts.prefix; attrs = opts.attrs || {}; location = opts.location || {}; - existingPrefixes = opts.existingPrefixes || {}; + var existingPrefixes = opts.existingPrefixes || {}; // defaults to the root node location.reference = location.reference || "/*"; // defaults to append action @@ -820,7 +820,7 @@ SignedXml.prototype.computeSignature = function(xml, opts, callback) { signatureDoc.insertBefore(self.createSignature(prefix), signedInfoNode.nextSibling) self.signatureXml = signatureDoc.toString() self.signedXml = doc.toString() - callback() + callback(null, self) } }) } @@ -1017,4 +1017,4 @@ SignedXml.prototype.getOriginalXmlWithIds = function() { SignedXml.prototype.getSignedXml = function() { return this.signedXml -} \ No newline at end of file +}