Comparing version 1.8.2 to 1.8.3
23
node.js
@@ -187,3 +187,3 @@ // Copyright 2018 AJ ONeal. All rights reserved | ||
} | ||
var body = { | ||
var req = { | ||
termsOfServiceAgreed: tosUrl === me._tos, | ||
@@ -195,3 +195,3 @@ onlyReturnExisting: false, | ||
// TODO is this really done by HMAC or is it arbitrary? | ||
body.externalAccountBinding = me.RSA.signJws( | ||
req.externalAccountBinding = me.RSA.signJws( | ||
options.externalAccount.secret, | ||
@@ -207,3 +207,3 @@ undefined, | ||
} | ||
var payload = JSON.stringify(body); | ||
var payload = JSON.stringify(req); | ||
var jws = me.RSA.signJws( | ||
@@ -240,3 +240,13 @@ options.accountKeypair, | ||
if (2 !== Math.floor(resp.statusCode / 100)) { | ||
throw new Error('account error: ' + JSON.stringify(body)); | ||
if ('string' !== typeof account) { | ||
account = JSON.stringify(account); | ||
} | ||
throw new Error( | ||
'account error: ' + | ||
resp.statusCode + | ||
' ' + | ||
account + | ||
'\n' + | ||
JSON.stringify(req) | ||
); | ||
} | ||
@@ -1104,3 +1114,6 @@ | ||
}); | ||
return ACME._depInit(me, options, dnsHosts).then(function(zonenames) { | ||
return ACME._depInit(me, options, dnsHosts).then(function(nada) { | ||
if (nada) { | ||
// fake use of nada to make both _wrapCb and jshint happy | ||
} | ||
return ACME._getZones(me, options, dnsHosts).then(function(zonenames) { | ||
@@ -1107,0 +1120,0 @@ options.zonenames = zonenames; |
{ | ||
"name": "acme-v2", | ||
"version": "1.8.2", | ||
"version": "1.8.3", | ||
"description": "A lightweight library for getting Free SSL certifications through Let's Encrypt, using the ACME protocol.", | ||
@@ -12,3 +12,3 @@ "homepage": "https://git.coolaj86.com/coolaj86/acme-v2.js", | ||
"type": "git", | ||
"url": "ssh://gitea@git.coolaj86.com:22042/coolaj86/acme-v2.js.git" | ||
"url": "https://git.coolaj86.com/coolaj86/acme-v2.js.git" | ||
}, | ||
@@ -15,0 +15,0 @@ "keywords": [ |
84023
19
2067