From 1abd3e43de0490a68b9e103758e87b917051d4df Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 13 Jul 2018 04:20:57 -0600 Subject: [PATCH] v2.3.8: update rsa-compat --- lib/core.js | 9 ++++----- package.json | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/core.js b/lib/core.js index a740eec..9ba2066 100644 --- a/lib/core.js +++ b/lib/core.js @@ -80,8 +80,6 @@ module.exports.create = function (gl) { } return utils.testEmail(args.email).then(function () { - var keypairOpts = { public: true, pem: true }; - var promise = gl.store.accounts.checkKeypairAsync(args).then(function (keypair) { if (keypair) { return RSA.import(keypair); @@ -91,7 +89,8 @@ module.exports.create = function (gl) { return gl.store.accounts.setKeypairAsync(args, RSA.import(args.accountKeypair)); } - return RSA.generateKeypairAsync(args.rsaKeySize, 65537, keypairOpts).then(function (keypair) { + var keypairOpts = { bitlen: args.rsaKeySize, exp: 65537, public: true, pem: true }; + return RSA.generateKeypairAsync(keypairOpts).then(function (keypair) { keypair.privateKeyPem = RSA.exportPrivatePem(keypair); keypair.publicKeyPem = RSA.exportPublicPem(keypair); keypair.privateKeyJwk = RSA.exportPrivateJwk(keypair); @@ -253,8 +252,8 @@ module.exports.create = function (gl) { return gl.store.certificates.setKeypairAsync(args, RSA.import(args.domainKeypair)); } - var keypairOpts = { public: true, pem: true }; - return RSA.generateKeypairAsync(args.rsaKeySize, 65537, keypairOpts).then(function (keypair) { + var keypairOpts = { bitlen: args.rsaKeySize, exp: 65537, public: true, pem: true }; + return RSA.generateKeypairAsync(keypairOpts).then(function (keypair) { keypair.privateKeyPem = RSA.exportPrivatePem(keypair); keypair.publicKeyPem = RSA.exportPublicPem(keypair); keypair.privateKeyJwk = RSA.exportPrivateJwk(keypair); diff --git a/package.json b/package.json index 3b55719..c2b6a1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "greenlock", - "version": "2.3.7", + "version": "2.3.8", "description": "Let's Encrypt for node.js on npm", "main": "index.js", "files": [ @@ -62,7 +62,7 @@ "le-store-certbot": "^2.1.7", "node.extend": "^1.1.5", "pkijs": "^1.3.27", - "rsa-compat": "^1.4.0" + "rsa-compat": "^1.5.0" }, "engines": { "node": ">=4.5"