@certd/acme-client 1.37.10 → 1.37.12

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 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.10",
6
+ "version": "1.37.12",
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.37.10",
21
+ "@certd/basic": "^1.37.12",
22
22
  "@peculiar/x509": "^1.11.0",
23
23
  "asn1js": "^3.0.5",
24
24
  "axios": "^1.7.2",
@@ -70,5 +70,5 @@
70
70
  "bugs": {
71
71
  "url": "https://github.com/publishlab/node-acme-client/issues"
72
72
  },
73
- "gitHead": "eb41a3655fe91af94f1c42a51aaa9122edfcf40e"
73
+ "gitHead": "7a1c6d291877b44c4b8add9f55549aa9be3f94a5"
74
74
  }
package/src/index.js CHANGED
@@ -31,9 +31,32 @@ export const directory = {
31
31
  sslcom:{
32
32
  staging: 'https://acme.ssl.com/sslcom-dv-rsa',
33
33
  production: 'https://acme.ssl.com/sslcom-dv-rsa',
34
- }
34
+ ec: 'https://acme.ssl.com/sslcom-dv-ecc',
35
+ },
36
+ litessl: {
37
+ staging: 'https://acme.litessl.com/acme/v2/directory',
38
+ production: 'https://acme.litessl.com/acme/v2/directory',
39
+ },
35
40
  };
36
41
 
42
+ export function getDirectoryUrl(opts) {
43
+ const {sslProvider, pkType} = opts
44
+ const list= directory[sslProvider]
45
+ if (!list) {
46
+ throw new Error(`sslProvider ${sslProvider} not found`)
47
+ }
48
+ let pkTypePrefix = pkType || 'rsa'
49
+ if (pkType) {
50
+ pkTypePrefix = pkType.toLowerCase().split("_")[0]
51
+ }
52
+
53
+ if (pkTypePrefix && list[pkTypePrefix]) {
54
+ return list[pkTypePrefix]
55
+ }
56
+
57
+ return list.production
58
+ }
59
+
37
60
  /**
38
61
  * Crypto
39
62
  */
package/types/index.d.ts CHANGED
@@ -117,6 +117,8 @@ export const directory: {
117
117
  }
118
118
  };
119
119
 
120
+ export function getDirectoryUrl(opts:{sslProvider:string, pkType: string}): string;
121
+
120
122
  /**
121
123
  * Crypto
122
124
  */