cert: add more debugs

This commit is contained in:
Girish Ramakrishnan
2019-10-03 10:36:57 -07:00
parent f296265461
commit 7e75ef7685
2 changed files with 10 additions and 0 deletions

View File

@@ -481,6 +481,8 @@ Acme2.prototype.prepareChallenge = function (hostname, domain, authorizationUrl,
assert.strictEqual(typeof authorizationUrl, 'string');
assert.strictEqual(typeof callback, 'function');
debug(`prepareChallenge: http: ${this.performHttpAuthorization}`);
const that = this;
superagent.get(authorizationUrl).timeout(30 * 1000).end(function (error, response) {
if (error && !error.response) return callback(new BoxError(BoxError.NETWORK_ERROR, 'Network error when preparing challenge'));
@@ -502,6 +504,8 @@ Acme2.prototype.cleanupChallenge = function (hostname, domain, challenge, callba
assert.strictEqual(typeof challenge, 'object');
assert.strictEqual(typeof callback, 'function');
debug(`cleanupChallenge: http: ${this.performHttpAuthorization}`);
if (this.performHttpAuthorization) {
this.cleanupHttpChallenge(hostname, domain, challenge, callback);
} else {