From a8299191f5c2ac134389a283603802c2d3856b14 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 29 Oct 2019 18:47:15 +0000 Subject: [PATCH] v3.0.9: use directoryUrl consistently --- accounts.js | 19 +++++++++++++++---- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/accounts.js b/accounts.js index a0bc2d1..7dd7568 100644 --- a/accounts.js +++ b/accounts.js @@ -79,7 +79,11 @@ A._newAccount = function(gnlck, mconf, db, acme, args, email, fullAccount) { email: email, subscriberEmail: email, customerEmail: args.customerEmail, - account: fullAccount || {} + account: fullAccount || {}, + directoryUrl: + args.directoryUrl || + mconf.directoryUrl || + gnlck._defaults.directoryUrl }; return U._getOrCreateKeypair(db, args.subject, query, keyType).then( @@ -114,7 +118,6 @@ A._newAccount = function(gnlck, mconf, db, acme, args, email, fullAccount) { } else { query.keypair = keypair; query.receipt = receipt; - query.directoryUrl = gnlck._defaults.directoryUrl; /* query.server = gnlck._defaults.directoryUrl.replace( /^https?:\/\//i, @@ -138,7 +141,11 @@ A._newAccount = function(gnlck, mconf, db, acme, args, email, fullAccount) { subscriberEmail: email, customerEmail: args.customerEmail, agreeTos: true, - directoryUrl: gnlck._defaults.directoryUrl + agreeToTerms: true, + directoryUrl: + args.directoryUrl || + mconf.directoryUrl || + gnlck._defaults.directoryUrl /* server: gnlck._defaults.directoryUrl.replace( /^https?:\/\//i, @@ -202,7 +209,11 @@ A._checkStore = function(gnlck, mconf, db, acme, args, email) { email: email, subscriberEmail: email, customerEmail: args.customerEmail || mconf.customerEmail, - account: account + account: account, + directoryUrl: + args.directoryUrl || + mconf.directoryUrl || + gnlck._defaults.directoryUrl }) .then(function(fullAccount) { if (!fullAccount) { diff --git a/package-lock.json b/package-lock.json index 68e3073..f00ff96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@root/greenlock", - "version": "3.0.8", + "version": "3.0.9", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index cfdbd41..0b19334 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@root/greenlock", - "version": "3.0.8", + "version": "3.0.9", "description": "The easiest Let's Encrypt client for Node.js and Browsers", "homepage": "https://rootprojects.org/greenlock/", "main": "greenlock.js",