diff --git a/lib/get-certificate.js b/lib/get-certificate.js index 813ae7e..47dd039 100644 --- a/lib/get-certificate.js +++ b/lib/get-certificate.js @@ -102,11 +102,9 @@ function getCert(options, cb) { thumbprint=cryptoUtil.thumbprint(state.accountKeyPair.publicKey); keyAuthorization=challenge.token+'.'+thumbprint; - challengePath='.well-known/acme-challenge/'+challenge.token; state.responseUrl=challenge.uri; - state.path=challengePath; - options.setChallenge(state.domain, '/'+challengePath, keyAuthorization, challengeDone); + options.setChallenge(state.domain, challenge.token, keyAuthorization, challengeDone); function challengeDone() { state.acme.post(state.responseUrl, { @@ -114,7 +112,7 @@ function getCert(options, cb) { keyAuthorization:keyAuthorization }, function(err, res, body) { ensureValidation(err, res, body, function unlink() { - options.removeChallenge(state.domain, '/'+challengePath, function () { + options.removeChallenge(state.domain, challenge.token, function () { // ignore }); });