@certd/acme-client 1.31.8 → 1.31.9
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 +3 -3
- package/src/verify.js +3 -1
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.31.
|
|
6
|
+
"version": "1.31.9",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"module": "scr/index.js",
|
|
9
9
|
"main": "src/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"types"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@certd/basic": "^1.31.
|
|
21
|
+
"@certd/basic": "^1.31.9",
|
|
22
22
|
"@peculiar/x509": "^1.11.0",
|
|
23
23
|
"asn1js": "^3.0.5",
|
|
24
24
|
"axios": "^1.7.2",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"bugs": {
|
|
68
68
|
"url": "https://github.com/publishlab/node-acme-client/issues"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "be58e3084bbcd86d9fcd10950aadf542191a6949"
|
|
71
71
|
}
|
package/src/verify.js
CHANGED
|
@@ -133,7 +133,9 @@ export async function walkTxtRecord(recordName) {
|
|
|
133
133
|
async function verifyDnsChallenge(authz, challenge, keyAuthorization, prefix = '_acme-challenge.') {
|
|
134
134
|
const recordName = `${prefix}${authz.identifier.value}`;
|
|
135
135
|
log(`本地校验TXT记录): ${recordName}`);
|
|
136
|
-
|
|
136
|
+
let recordValues = await walkTxtRecord(recordName);
|
|
137
|
+
//去重
|
|
138
|
+
recordValues = [...new Set(recordValues)];
|
|
137
139
|
log(`DNS查询成功, 找到 ${recordValues.length} 条TXT记录`);
|
|
138
140
|
if (!recordValues.length || !recordValues.includes(keyAuthorization)) {
|
|
139
141
|
throw new Error(`没有找到需要的DNS TXT记录: ${recordName},期望:${keyAuthorization},结果:${recordValues}`);
|