Merge branch 'new-authzr-uri' of mrstegeman/le-store-certbot.js into master

This commit is contained in:
AJ ONeal 2018-05-21 17:13:38 +00:00 committed by Gitea
commit 80a93b467a
1 changed files with 9 additions and 1 deletions

View File

@ -486,6 +486,14 @@ module.exports.create = function (configs) {
'/acme/reg/' + accountId);
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
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' }
*/
, fs.writeFileAsync(path.join(accountDir, 'regr.json'),
JSON.stringify({ body: reg.receipt, uri: uri }),
JSON.stringify(regrBody),
'utf8')
]);
}).then(function () {