@certd/acme-client 1.37.15 → 1.37.17
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 +4 -4
- package/src/util.js +1 -1
- package/src/verify.js +7 -3
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.37.
|
|
6
|
+
"version": "1.37.17",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"module": "scr/index.js",
|
|
9
9
|
"main": "src/index.js",
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"types"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@certd/basic": "^1.37.
|
|
21
|
+
"@certd/basic": "^1.37.17",
|
|
22
22
|
"@peculiar/x509": "^1.11.0",
|
|
23
23
|
"asn1js": "^3.0.5",
|
|
24
|
-
"axios": "^1.
|
|
24
|
+
"axios": "^1.9.0",
|
|
25
25
|
"debug": "^4.3.5",
|
|
26
26
|
"http-proxy-agent": "^7.0.2",
|
|
27
27
|
"https-proxy-agent": "^7.0.5",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"bugs": {
|
|
71
71
|
"url": "https://github.com/publishlab/node-acme-client/issues"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "786780ce9b0ee9b9ebb104f54abb161ae9a924e9"
|
|
74
74
|
}
|
package/src/util.js
CHANGED
|
@@ -247,7 +247,7 @@ async function getAuthoritativeDnsResolver(recordName, logger = log) {
|
|
|
247
247
|
|
|
248
248
|
try {
|
|
249
249
|
/* Resolve root domain by SOA */
|
|
250
|
-
const domain = await resolveDomainBySoaRecord(
|
|
250
|
+
const domain = await resolveDomainBySoaRecord(recordName,logger);
|
|
251
251
|
|
|
252
252
|
/* Resolve authoritative NS addresses */
|
|
253
253
|
logger(`获取到权威NS服务器name: ${domain}`);
|
package/src/verify.js
CHANGED
|
@@ -8,7 +8,7 @@ import {log as defaultLog} from './logger.js'
|
|
|
8
8
|
import axios from './axios.js'
|
|
9
9
|
import * as util from './util.js'
|
|
10
10
|
import {isAlpnCertificateAuthorizationValid} from './crypto/index.js'
|
|
11
|
-
|
|
11
|
+
import {utils} from '@certd/basic'
|
|
12
12
|
|
|
13
13
|
const dns = dnsSdk.promises
|
|
14
14
|
|
|
@@ -60,11 +60,15 @@ async function verifyHttpChallenge(authz, challenge, keyAuthorization, suffix =
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
const httpPort = axios.defaults.acmeSettings.httpChallengePort || 80;
|
|
63
|
-
|
|
63
|
+
let host = authz.identifier.value;
|
|
64
|
+
if(utils.domain.isIpv6(host)){
|
|
65
|
+
host = `[${host}]`;
|
|
66
|
+
}
|
|
67
|
+
const challengeUrl = `http://${host}:${httpPort}${suffix}`;
|
|
64
68
|
|
|
65
69
|
if (!await doQuery(challengeUrl)) {
|
|
66
70
|
const httpsPort = axios.defaults.acmeSettings.httpsChallengePort || 443;
|
|
67
|
-
const httpsChallengeUrl = `https://${
|
|
71
|
+
const httpsChallengeUrl = `https://${host}:${httpsPort}${suffix}`;
|
|
68
72
|
const res = await doQuery(httpsChallengeUrl)
|
|
69
73
|
if (!res) {
|
|
70
74
|
throw new Error(`[error] 验证失败,请检查以上测试url是否可以正常访问`);
|