Compare commits
2 Commits
1af2fb2958
...
621e04ffe6
Author | SHA1 | Date | |
---|---|---|---|
621e04ffe6 | |||
f0f9feb519 |
12
node.js
12
node.js
@ -148,6 +148,7 @@ ACME._registerAccount = function (me, options) {
|
|||||||
, contact: contact
|
, contact: contact
|
||||||
};
|
};
|
||||||
if (options.externalAccount) {
|
if (options.externalAccount) {
|
||||||
|
// TODO is this really done by HMAC or is it arbitrary?
|
||||||
body.externalAccountBinding = me.RSA.signJws(
|
body.externalAccountBinding = me.RSA.signJws(
|
||||||
options.externalAccount.secret
|
options.externalAccount.secret
|
||||||
, undefined
|
, undefined
|
||||||
@ -637,6 +638,13 @@ ACME._getCertificate = function (me, options) {
|
|||||||
return results.challenges.some(function (ch) {
|
return results.challenges.some(function (ch) {
|
||||||
return ch.type === chType;
|
return ch.type === chType;
|
||||||
});
|
});
|
||||||
|
}).sort(function (aType, bType) {
|
||||||
|
var a = results.challenges.filter(function (ch) { return ch.type === aType; })[0];
|
||||||
|
var b = results.challenges.filter(function (ch) { return ch.type === bType; })[0];
|
||||||
|
|
||||||
|
if ('valid' === a.status) { return 1; }
|
||||||
|
if ('valid' === b.status) { return -1; }
|
||||||
|
return 0;
|
||||||
})[0];
|
})[0];
|
||||||
|
|
||||||
var challenge = results.challenges.filter(function (ch) {
|
var challenge = results.challenges.filter(function (ch) {
|
||||||
@ -651,6 +659,10 @@ ACME._getCertificate = function (me, options) {
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("valid" === challenge.status) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return ACME._postChallenge(me, options, results.identifier, challenge);
|
return ACME._postChallenge(me, options, results.identifier, challenge);
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
return next();
|
return next();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "acme-v2",
|
"name": "acme-v2",
|
||||||
"version": "1.5.2",
|
"version": "1.5.3",
|
||||||
"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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user