Fix undefined private key when checking keys apart from certs #37

Merged
coolaj86 merged 2 commits from bugfixes into master 2019-05-09 03:46:52 +00:00
3 changed files with 31 additions and 39 deletions

View File

@ -505,7 +505,7 @@ module.exports.create = function (gl) {
return cert;
} else {
return gl.store.certificates.checkKeypairAsync(args).then(function (keypair) {
cert.privkey = RSA.exportPrivatePem(keypair).privateKeyPem;
cert.privkey = keypair.privateKeyPem || RSA.exportPrivatePem(keypair);
return cert;
});
}

60
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "greenlock",
"version": "2.7.16",
"version": "2.7.17",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -9,6 +9,11 @@
"resolved": "https://registry.npmjs.org/@coolaj86/urequest/-/urequest-1.3.7.tgz",
"integrity": "sha512-PPrVYra9aWvZjSCKl/x1pJ9ZpXda1652oJrPBYy5rQumJJMkmTBN3ux+sK2xAUwVvv2wnewDlaQaHLxLwSHnIA=="
},
"@root/mkdirp": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@root/mkdirp/-/mkdirp-1.0.0.tgz",
"integrity": "sha512-hxGAYUx5029VggfG+U9naAhQkoMSXtOeXtbql97m3Hi6/sQSRL/4khKZPyOF6w11glyCOU38WCNLu9nUcSjOfA=="
},
"acme": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/acme/-/acme-1.3.0.tgz",
@ -42,11 +47,11 @@
"integrity": "sha512-CJI9RAtrZl9ICldyU5cRGzb1/wIbS3O+MJy9z7gKb7fLDNF7Wmw9Fv2agBLSOtIPr7TYgyyesvt8ppA4OIS+yg=="
},
"greenlock-store-fs": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/greenlock-store-fs/-/greenlock-store-fs-3.0.0.tgz",
"integrity": "sha512-LngMK+RAR+puo53pmqzcSrKinqcYwAKQGyvILuLDJXA4KJ+IUUfqk/GW2J0VDArw3iIsZkTxgXDwoIGCteO6oA==",
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/greenlock-store-fs/-/greenlock-store-fs-3.0.2.tgz",
"integrity": "sha512-t4So75yKs1+7TqmxD5UKdf+zOQU0/4o0lb2auf5zUcAo7fwwNLOAXyWnnZRL3WuFBUiBGh1qXWleuMua0d3LPg==",
"requires": {
"mkdirp": "^0.5.1",
"@root/mkdirp": "^1.0.0",
"safe-replace": "^1.1.0"
}
},
@ -60,45 +65,32 @@
}
},
"le-challenge-fs": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/le-challenge-fs/-/le-challenge-fs-2.0.8.tgz",
"integrity": "sha1-ttRYo38JfoffPYtf9nATc3q51aI=",
"version": "2.0.9",
"resolved": "https://registry.npmjs.org/le-challenge-fs/-/le-challenge-fs-2.0.9.tgz",
"integrity": "sha512-stzI6rxd+aXGxBl87QJKKY/i/wl3uz6EoWzX2xSazJvCPSYBQys1RVNgOcf0SfUQPh6TBCFJFSJkiR4mznb4sg==",
"requires": {
"mkdirp": "^0.5.1"
"@root/mkdirp": "^1.0.0"
}
},
"le-sni-auto": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/le-sni-auto/-/le-sni-auto-2.1.8.tgz",
"integrity": "sha512-aEUP+DB5mfHi4kHY37nJdtVr+DIF5vxiXKdiZBPOLNgF7pK3iD0wJU6fiwDRtZRz2KOahX+VBxlgTN2r24nKhw=="
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/le-sni-auto/-/le-sni-auto-2.1.9.tgz",
"integrity": "sha512-QmQHNwQDi/56GY8+qczFZ06FZbxaeJQjbjEhwwQHhkJ9IHhIQFkPfCT/OyDfLj4gqLIrg5ZX8CemxxVZnLEYfg=="
},
"le-store-certbot": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/le-store-certbot/-/le-store-certbot-2.2.2.tgz",
"integrity": "sha512-KOU8O2KAtUUiNj8SGdj4gg7v6Je2v5E/2IipzVIvs2bBM6+OsbVTFKz7/7PKm4t2dT2IoI93TYpi69lV29fkpQ==",
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/le-store-certbot/-/le-store-certbot-2.2.3.tgz",
"integrity": "sha512-c4ACR+v+JKMiAOOshLh6gdCKA7wIWR16+mROMLpQjq3rXJ3Vm8FaBHe2H+crT+flP+g7FmciAwUlfOJEJpIuCQ==",
"requires": {
"mkdirp": "^0.5.1",
"pyconf": "^1.1.5",
"safe-replace": "^1.0.3"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
"@root/mkdirp": "^1.0.0",
"pyconf": "^1.1.7",
"safe-replace": "^1.1.0"
}
},
"pyconf": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/pyconf/-/pyconf-1.1.6.tgz",
"integrity": "sha512-4ujjwqch6nViWduSLc3/QFrDdJJAvAE7NRBarSGLANwh0tNW0MbXeJE8ZziJZvzRnUEN5scYwsS+ItYU1uj6dQ==",
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/pyconf/-/pyconf-1.1.7.tgz",
"integrity": "sha512-v4clh33m68sjtMsh8XMpjhGWb/MQODAYZ1y7ORG5Qv58UK25OddoB+oXyexgDkK8ttFui/lZm2sQDgA2Ftjfkw==",
"requires": {
"safe-replace": "^1.0.2"
}

View File

@ -1,6 +1,6 @@
{
"name": "greenlock",
"version": "2.7.17",
"version": "2.7.18",
"description": "Let's Encrypt for node.js on npm",
"main": "index.js",
"files": [
@ -41,12 +41,12 @@
"acme": "^1.3.0",
"acme-v2": "^1.7.7",
"cert-info": "^1.5.1",
"keypairs": "^1.2.14",
"greenlock-challenge-dns": "^3.0.0",
"greenlock-store-fs": "^3.0.2",
"keypairs": "^1.2.14",
"le-challenge-fs": "^2.0.2",
"le-sni-auto": "^2.1.8",
"le-sni-auto": "^2.1.9",
"le-store-certbot": "^2.2.2",
"greenlock-store-fs": "^3.0.0",
"rsa-compat": "^2.0.6"
},
"engines": {