Add missing field to regr.json.
When using generated configs with older certbot versions, i.e. <0.11, certbot bombs out without new_authzr_uri.
This commit is contained in:
parent
04f93070dc
commit
87853bc37b
10
index.js
10
index.js
|
@ -486,6 +486,14 @@ module.exports.create = function (configs) {
|
||||||
'/acme/reg/' + accountId);
|
'/acme/reg/' + accountId);
|
||||||
|
|
||||||
return mkdirpAsync(accountDir).then(function () {
|
return mkdirpAsync(accountDir).then(function () {
|
||||||
|
var regrBody = {
|
||||||
|
body: reg.receipt,
|
||||||
|
uri: uri,
|
||||||
|
};
|
||||||
|
|
||||||
|
if (typeof reg.newAuthzUrl !== 'undefined') {
|
||||||
|
regrBody.new_authzr_uri = reg.newAuthzUrl;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO abstract file writing
|
// TODO abstract file writing
|
||||||
return PromiseA.all([
|
return PromiseA.all([
|
||||||
|
@ -503,7 +511,7 @@ module.exports.create = function (configs) {
|
||||||
terms_of_service: 'https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf' }
|
terms_of_service: 'https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf' }
|
||||||
*/
|
*/
|
||||||
, fs.writeFileAsync(path.join(accountDir, 'regr.json'),
|
, fs.writeFileAsync(path.join(accountDir, 'regr.json'),
|
||||||
JSON.stringify({ body: reg.receipt, uri: uri }),
|
JSON.stringify(regrBody),
|
||||||
'utf8')
|
'utf8')
|
||||||
]);
|
]);
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
|
|
Loading…
Reference in New Issue