v3.0.9: use directoryUrl consistently

This commit is contained in:
AJ ONeal 2019-10-29 18:47:15 +00:00
parent 6665dc3cf8
commit a8299191f5
3 changed files with 17 additions and 6 deletions

View File

@ -79,7 +79,11 @@ A._newAccount = function(gnlck, mconf, db, acme, args, email, fullAccount) {
email: email, email: email,
subscriberEmail: email, subscriberEmail: email,
customerEmail: args.customerEmail, customerEmail: args.customerEmail,
account: fullAccount || {} account: fullAccount || {},
directoryUrl:
args.directoryUrl ||
mconf.directoryUrl ||
gnlck._defaults.directoryUrl
}; };
return U._getOrCreateKeypair(db, args.subject, query, keyType).then( return U._getOrCreateKeypair(db, args.subject, query, keyType).then(
@ -114,7 +118,6 @@ A._newAccount = function(gnlck, mconf, db, acme, args, email, fullAccount) {
} else { } else {
query.keypair = keypair; query.keypair = keypair;
query.receipt = receipt; query.receipt = receipt;
query.directoryUrl = gnlck._defaults.directoryUrl;
/* /*
query.server = gnlck._defaults.directoryUrl.replace( query.server = gnlck._defaults.directoryUrl.replace(
/^https?:\/\//i, /^https?:\/\//i,
@ -138,7 +141,11 @@ A._newAccount = function(gnlck, mconf, db, acme, args, email, fullAccount) {
subscriberEmail: email, subscriberEmail: email,
customerEmail: args.customerEmail, customerEmail: args.customerEmail,
agreeTos: true, agreeTos: true,
directoryUrl: gnlck._defaults.directoryUrl agreeToTerms: true,
directoryUrl:
args.directoryUrl ||
mconf.directoryUrl ||
gnlck._defaults.directoryUrl
/* /*
server: gnlck._defaults.directoryUrl.replace( server: gnlck._defaults.directoryUrl.replace(
/^https?:\/\//i, /^https?:\/\//i,
@ -202,7 +209,11 @@ A._checkStore = function(gnlck, mconf, db, acme, args, email) {
email: email, email: email,
subscriberEmail: email, subscriberEmail: email,
customerEmail: args.customerEmail || mconf.customerEmail, customerEmail: args.customerEmail || mconf.customerEmail,
account: account account: account,
directoryUrl:
args.directoryUrl ||
mconf.directoryUrl ||
gnlck._defaults.directoryUrl
}) })
.then(function(fullAccount) { .then(function(fullAccount) {
if (!fullAccount) { if (!fullAccount) {

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@root/greenlock", "name": "@root/greenlock",
"version": "3.0.8", "version": "3.0.9",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@root/greenlock", "name": "@root/greenlock",
"version": "3.0.8", "version": "3.0.9",
"description": "The easiest Let's Encrypt client for Node.js and Browsers", "description": "The easiest Let's Encrypt client for Node.js and Browsers",
"homepage": "https://rootprojects.org/greenlock/", "homepage": "https://rootprojects.org/greenlock/",
"main": "greenlock.js", "main": "greenlock.js",