@certd/acme-client 1.20.16 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/auto.js +5 -1
- package/src/index.js +1 -0
- package/src/verify.js +12 -12
- package/types/index.d.ts +1 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Simple and unopinionated ACME client",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "nmorsman",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.21.0",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"types": "types/index.d.ts",
|
|
9
9
|
"license": "MIT",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"bugs": {
|
|
60
60
|
"url": "https://github.com/publishlab/node-acme-client/issues"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "4656019898924fb69de06fec5feb123d9c36b555"
|
|
63
63
|
}
|
package/src/auto.js
CHANGED
|
@@ -36,6 +36,9 @@ module.exports = async (client, userOpts) => {
|
|
|
36
36
|
if (opts.email) {
|
|
37
37
|
accountPayload.contact = [`mailto:${opts.email}`];
|
|
38
38
|
}
|
|
39
|
+
if (opts.externalAccountBinding) {
|
|
40
|
+
accountPayload.externalAccountBinding = opts.externalAccountBinding;
|
|
41
|
+
}
|
|
39
42
|
|
|
40
43
|
/**
|
|
41
44
|
* Register account
|
|
@@ -129,7 +132,8 @@ module.exports = async (client, userOpts) => {
|
|
|
129
132
|
// throw new Error('测试异常');
|
|
130
133
|
/* Challenge verification */
|
|
131
134
|
if (opts.skipChallengeVerification === true) {
|
|
132
|
-
log(`[auto] [${d}] Skipping challenge verification since skipChallengeVerification=true`);
|
|
135
|
+
log(`[auto] [${d}] Skipping challenge verification since skipChallengeVerification=true,wait 60s`);
|
|
136
|
+
await wait(60 * 1000);
|
|
133
137
|
}
|
|
134
138
|
else {
|
|
135
139
|
log(`[auto] [${d}] Running challenge verification`);
|
package/src/index.js
CHANGED
package/src/verify.js
CHANGED
|
@@ -48,18 +48,18 @@ async function verifyHttpChallenge(authz, challenge, keyAuthorization, suffix =
|
|
|
48
48
|
|
|
49
49
|
async function walkDnsChallengeRecord(recordName, resolver = dns) {
|
|
50
50
|
/* Resolve CNAME record first */
|
|
51
|
-
try {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
catch (e) {
|
|
61
|
-
|
|
62
|
-
}
|
|
51
|
+
// try {
|
|
52
|
+
// log(`Checking name for CNAME records: ${recordName}`);
|
|
53
|
+
// const cnameRecords = await resolver.resolveCname(recordName);
|
|
54
|
+
//
|
|
55
|
+
// if (cnameRecords.length) {
|
|
56
|
+
// log(`CNAME record found at ${recordName}, new challenge record name: ${cnameRecords[0]}`);
|
|
57
|
+
// return walkDnsChallengeRecord(cnameRecords[0]);
|
|
58
|
+
// }
|
|
59
|
+
// }
|
|
60
|
+
// catch (e) {
|
|
61
|
+
// log(`No CNAME records found for name: ${recordName}`);
|
|
62
|
+
// }
|
|
63
63
|
|
|
64
64
|
/* Resolve TXT records */
|
|
65
65
|
try {
|