Compare commits

...

2 Commits

Author SHA1 Message Date
AJ ONeal 89487c2030 v1.0.7 2018-05-18 00:58:15 -06:00
AJ ONeal 5037ad6b0b improve error message as per coolaj86/greenlock.js#12 2018-05-18 00:55:50 -06:00
2 changed files with 15 additions and 6 deletions

19
node.js
View File

@ -22,15 +22,20 @@ ACME.challengeTests = {
return true; return true;
} }
err = new Error("self check does not pass"); err = new Error(
err.code = 'E_RETRY'; "Error: Failed HTTP-01 Dry Run.\n"
+ "curl '" + url + "' does not return '" + auth.keyAuthorization + "'\n"
+ "See https://git.coolaj86.com/coolaj86/acme-v2.js/issues/4"
);
err.code = 'E_FAIL_DRY_CHALLENGE';
return Promise.reject(err); return Promise.reject(err);
}); });
} }
, 'dns-01': function (me, auth) { , 'dns-01': function (me, auth) {
var hostname = ACME.challengePrefixes['dns-01'] + '.' + auth.hostname;
return me._dig({ return me._dig({
type: 'TXT' type: 'TXT'
, name: ACME.challengePrefixes['dns-01'] + '.' + auth.hostname , name: hostname
}).then(function (ans) { }).then(function (ans) {
var err; var err;
@ -40,8 +45,12 @@ ACME.challengeTests = {
return true; return true;
} }
err = new Error("self check does not pass"); err = new Error(
err.code = 'E_RETRY'; "Error: Failed DNS-01 Dry Run.\n"
+ "dig TXT '" + hostname + "' does not return '" + auth.dnsAuthorization + "'\n"
+ "See https://git.coolaj86.com/coolaj86/acme-v2.js/issues/4"
);
err.code = 'E_FAIL_DRY_CHALLENGE';
return Promise.reject(err); return Promise.reject(err);
}); });
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "acme-v2", "name": "acme-v2",
"version": "1.0.6", "version": "1.0.7",
"description": "Free SSL. A framework for building Let's Encrypt v2 clients, and other ACME v2 (draft 11) clients. Successor to le-acme-core.js", "description": "Free SSL. A framework for building Let's Encrypt v2 clients, and other ACME v2 (draft 11) clients. Successor to le-acme-core.js",
"homepage": "https://git.coolaj86.com/coolaj86/acme-v2.js", "homepage": "https://git.coolaj86.com/coolaj86/acme-v2.js",
"main": "node.js", "main": "node.js",