From a89791ddba05832881589bbcfb07a7331a4d894d Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 5 Apr 2019 18:28:27 -0600 Subject: [PATCH] v1.0.1: reduce output just a titch --- index.js | 14 ++++++++------ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index 2b8a40a..5a7043b 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ module.exports.create = function (opts) { // Whenever a new keypair is used to successfully create an account, we need to save its keypair store.accounts.setKeypair = function (opts) { - console.log('accounts.setKeypair:', opts); + console.log('accounts.setKeypair:', opts.account, opts.email, opts.keypair); var id = opts.account.id || opts.email || 'default'; var keypair = opts.keypair; @@ -45,7 +45,7 @@ module.exports.create = function (opts) { // We need a way to retrieve a prior account's keypair for renewals and additional ACME certificate "orders" store.accounts.checkKeypair = function (opts) { - console.log('accounts.checkKeypair:', opts); + console.log('accounts.checkKeypair:', opts.account, opts.email); var id = opts.account.id || opts.email || 'default'; var keyblob = cache.keypairs[id]; @@ -75,7 +75,7 @@ module.exports.create = function (opts) { // The certificate keypairs must not be the same as any account keypair store.certificates.setKeypair = function (opts) { - console.log('certificates.setKeypair:', opts); + console.log('certificates.setKeypair:', opts.certificate, opts.subject, opts.keypair); var id = opts.certificate.kid || opts.certificate.id || opts.subject; var keypair = opts.keypair; @@ -94,7 +94,7 @@ module.exports.create = function (opts) { // You won't be able to use a certificate without it's private key, gotta save it store.certificates.checkKeypair = function (opts) { - console.log('certificates.checkKeypair:', opts); + console.log('certificates.checkKeypair:', opts.certificate, opts.subject); var id = opts.certificate.kid || opts.certificate.id || opts.subject; var keyblob = cache.keypairs[id]; @@ -110,7 +110,7 @@ module.exports.create = function (opts) { // (perhaps to delete expired keys), but the same information can also be redireved from // the key using the "cert-info" package. store.certificates.set = function (opts) { - console.log('certificates.set:', opts); + console.log('certificates.set:', opts.certificate, opts.subject); var id = opts.certificate.id || opts.subject; var pems = opts.pems; @@ -132,7 +132,7 @@ module.exports.create = function (opts) { // but it's easiest to implement last since it's not useful until there // are certs that can actually be loaded from storage. store.certificates.check = function (opts) { - console.log('certificates.check:', opts); + console.log('certificates.check:', opts.certificate, opts.subject); var id = opts.certificate.id || opts.subject; var certblob = cache.certificates[id]; @@ -141,4 +141,6 @@ module.exports.create = function (opts) { return JSON.parse(certblob); }; + + return store; }; diff --git a/package-lock.json b/package-lock.json index 1a3f081..67e9738 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { "name": "le-store-memory", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 1 } diff --git a/package.json b/package.json index 8b9b0dc..5505346 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "le-store-memory", - "version": "1.0.0", + "version": "1.0.1", "description": "An in-memory reference implementation for account, certificate, and keypair storage strategies in Greenlock", "homepage": "https://git.coolaj86.com/coolaj86/le-store-memory.js", "main": "index.js",