diff --git a/.travis.yml b/.travis.yml index b3d4c98..656ae12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js before_install: npm i -g npm@1.4.28 node_js: - - 0.8 - - 0.10 \ No newline at end of file + - 4 + - 6 \ No newline at end of file diff --git a/lib/passport-wsfed-saml2/saml.js b/lib/passport-wsfed-saml2/saml.js index fd89c74..9c4bb18 100644 --- a/lib/passport-wsfed-saml2/saml.js +++ b/lib/passport-wsfed-saml2/saml.js @@ -64,7 +64,7 @@ SAML.prototype.validateSignature = function (xml, options, callback) { var base64cer = embeddedSignature[0].firstChild.toString(); var shasum = crypto.createHash('sha1'); var der = new Buffer(base64cer, 'base64').toString('binary'); - shasum.update(der); + shasum.update(der, 'latin1'); self.calculatedThumbprint = shasum.digest('hex'); // using embedded cert, so options.cert is not used anymore diff --git a/lib/passport-wsfed-saml2/samlp.js b/lib/passport-wsfed-saml2/samlp.js index 5b90467..0f8c66b 100644 --- a/lib/passport-wsfed-saml2/samlp.js +++ b/lib/passport-wsfed-saml2/samlp.js @@ -83,7 +83,7 @@ var removeHeaders = function (cert) { var sign = function (content, key, algorithm) { var signer = crypto.createSign(algorithm.toUpperCase()); - signer.update(content); + signer.update(content, 'latin1'); return signer.sign(key, 'base64'); };