From 766eaa3eed04ca5993662957cb1970282109180b Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 2 Oct 2018 23:23:01 +0000 Subject: [PATCH 1/3] update link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a6a79d9..3d1d6d8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The reference implementation, specification, template, and tests for creating an The reference implementation is completely in-memory. -See [Help Wanted: Database Plugins (for saving certs)](https://github.com/Daplie/node-letsencrypt/issues/39) +See [Help Wanted: Database Plugins (for saving certs)](https://git.coolaj86.com/coolaj86/le-store-SPEC.js/issues/1) How to create a custom strategy =============================== From c58785f6e3368b261d651ad3416ae6e357b955fb Mon Sep 17 00:00:00 2001 From: CaptEmulation Date: Sun, 17 Feb 2019 11:37:22 -0600 Subject: [PATCH 2/3] Updates from writing my own store --- index.js | 9 +++++---- tests/basic.js | 9 +++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index 267779c..3a3f8d0 100644 --- a/index.js +++ b/index.js @@ -257,18 +257,19 @@ module.exports.create = function (options) { // Certificates - , set: function (opts, certs, cb) { + , set: function (opts, cb) { // opts.domains // opts.email // optional // opts.accountId // optional - // certs.privkey - // certs.cert - // certs.chain + // opts.certs.privkey + // opts.certs.cert + // opts.certs.chain var index; var accountId; var account; + var certs = opts.certs; var subject = certs.subject || opts.domains[0]; var altnames = certs.altnames || opts.domains; var accountCerts; diff --git a/tests/basic.js b/tests/basic.js index 5167666..8682967 100644 --- a/tests/basic.js +++ b/tests/basic.js @@ -96,9 +96,8 @@ var tests = [ var account = { agreeTos: true , keypair: goodGuy.keypair - , receipt: {} + , receipt: { foo: 'bar' } }; - return leStore.accounts.setAsync(goodGuy, account).then(function (account) { if (!account || !account.id || !account.email) { throw new Error('accounts.set should return the object with its new `id` attached'); @@ -113,7 +112,6 @@ var tests = [ return leStore.accounts.checkAsync({ accountId: goodGuy.accountId }).then(function (account) { - if (!account) { throw new Error("Did not find account."); } @@ -192,7 +190,6 @@ var tests = [ account[rnd] = rnd; return leStore.accounts.setKeypairAsync(opts, account.keypair).then(function () { return leStore.accounts.setAsync(opts, account).then(function (account) { - if ('_account_id' === account.id || '__account_id' === account.id) { throw new Error("Should create `id` deterministically from email or public key, not the given `accountId` or `id`."); } @@ -264,7 +261,7 @@ var tests = [ } }; - return leStore.certificates.setAsync(certOpts, certOpts.certs); + return leStore.certificates.setAsync(certOpts); } // and another , function () { @@ -278,7 +275,7 @@ var tests = [ } }; - return leStore.certificates.setAsync(certOpts, certOpts.certs); + return leStore.certificates.setAsync(certOpts); } // basic test (set by email) From 06c78a6a10324b3640184ed1c63a41a6067f0515 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 30 Mar 2019 15:51:51 +0000 Subject: [PATCH 3/3] A Root Project --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3d1d6d8..82f8697 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # le-store-SPEC -| Sponsored by [ppl](https://ppl.family) | [greenlock.js](https://git.coolaj86.com/coolaj86/greenlock.js) | +| A [Root](https://rootprojects.org) Project | [greenlock.js](https://git.coolaj86.com/coolaj86/greenlock.js) | The reference implementation, specification, template, and tests for creating an le-store- strategy. @@ -8,8 +8,7 @@ The reference implementation is completely in-memory. See [Help Wanted: Database Plugins (for saving certs)](https://git.coolaj86.com/coolaj86/le-store-SPEC.js/issues/1) -How to create a custom strategy -=============================== +# How to create a custom strategy READ THIS README: Believe it or not, most of your answers are either right here