challengePath => challenge.token

This commit is contained in:
AJ ONeal 2015-12-15 15:20:03 +00:00
parent 0775bf9000
commit c129167b35
1 changed files with 2 additions and 4 deletions

View File

@ -102,11 +102,9 @@ function getCert(options, cb) {
thumbprint=cryptoUtil.thumbprint(state.accountKeyPair.publicKey); thumbprint=cryptoUtil.thumbprint(state.accountKeyPair.publicKey);
keyAuthorization=challenge.token+'.'+thumbprint; keyAuthorization=challenge.token+'.'+thumbprint;
challengePath='.well-known/acme-challenge/'+challenge.token;
state.responseUrl=challenge.uri; state.responseUrl=challenge.uri;
state.path=challengePath;
options.setChallenge(state.domain, '/'+challengePath, keyAuthorization, challengeDone); options.setChallenge(state.domain, challenge.token, keyAuthorization, challengeDone);
function challengeDone() { function challengeDone() {
state.acme.post(state.responseUrl, { state.acme.post(state.responseUrl, {
@ -114,7 +112,7 @@ function getCert(options, cb) {
keyAuthorization:keyAuthorization keyAuthorization:keyAuthorization
}, function(err, res, body) { }, function(err, res, body) {
ensureValidation(err, res, body, function unlink() { ensureValidation(err, res, body, function unlink() {
options.removeChallenge(state.domain, '/'+challengePath, function () { options.removeChallenge(state.domain, challenge.token, function () {
// ignore // ignore
}); });
}); });