@certd/acme-client 1.24.3 → 1.25.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 +3 -3
- package/src/crypto/index.js +4 -4
- package/src/index.js +1 -1
- package/types/index.d.ts +4 -4
package/package.json
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
"description": "Simple and unopinionated ACME client",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "nmorsman",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.25.0",
|
|
7
7
|
"main": "src/index.js",
|
|
8
8
|
"types": "types/index.d.ts",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"homepage": "https://github.com/publishlab/node-acme-client",
|
|
11
11
|
"engines": {
|
|
12
|
-
"node": ">=
|
|
12
|
+
"node": ">= 18"
|
|
13
13
|
},
|
|
14
14
|
"files": [
|
|
15
15
|
"src",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"bugs": {
|
|
60
60
|
"url": "https://github.com/publishlab/node-acme-client/issues"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "1906c310f52b0b6dcb268530add4d5a3a962bdea"
|
|
63
63
|
}
|
package/src/crypto/index.js
CHANGED
|
@@ -67,11 +67,11 @@ function getKeyInfo(keyPem) {
|
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
69
|
|
|
70
|
-
async function createPrivateRsaKey(modulusLength = 2048) {
|
|
70
|
+
async function createPrivateRsaKey(modulusLength = 2048, encodingType = 'pkcs8') {
|
|
71
71
|
const pair = await generateKeyPair('rsa', {
|
|
72
72
|
modulusLength,
|
|
73
73
|
privateKeyEncoding: {
|
|
74
|
-
type:
|
|
74
|
+
type: encodingType,
|
|
75
75
|
format: 'pem',
|
|
76
76
|
},
|
|
77
77
|
});
|
|
@@ -106,11 +106,11 @@ exports.createPrivateKey = createPrivateRsaKey;
|
|
|
106
106
|
* ```
|
|
107
107
|
*/
|
|
108
108
|
|
|
109
|
-
exports.createPrivateEcdsaKey = async (namedCurve = 'P-256') => {
|
|
109
|
+
exports.createPrivateEcdsaKey = async (namedCurve = 'P-256', encodingType = 'pkcs8') => {
|
|
110
110
|
const pair = await generateKeyPair('ec', {
|
|
111
111
|
namedCurve,
|
|
112
112
|
privateKeyEncoding: {
|
|
113
|
-
type:
|
|
113
|
+
type: encodingType,
|
|
114
114
|
format: 'pem',
|
|
115
115
|
},
|
|
116
116
|
});
|
package/src/index.js
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -155,16 +155,16 @@ export interface EcdsaPublicJwk {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
export interface CryptoInterface {
|
|
158
|
-
createPrivateKey(keySize?: number): Promise<PrivateKeyBuffer>;
|
|
159
|
-
createPrivateRsaKey(keySize?: number): Promise<PrivateKeyBuffer>;
|
|
160
|
-
createPrivateEcdsaKey(namedCurve?: 'P-256' | 'P-384' | 'P-521'): Promise<PrivateKeyBuffer>;
|
|
158
|
+
createPrivateKey(keySize?: number,encodingType?:string): Promise<PrivateKeyBuffer>;
|
|
159
|
+
createPrivateRsaKey(keySize?: number,encodingType?:string): Promise<PrivateKeyBuffer>;
|
|
160
|
+
createPrivateEcdsaKey(namedCurve?: 'P-256' | 'P-384' | 'P-521',encodingType?:string): Promise<PrivateKeyBuffer>;
|
|
161
161
|
getPublicKey(keyPem: PrivateKeyBuffer | PrivateKeyString | PublicKeyBuffer | PublicKeyString): PublicKeyBuffer;
|
|
162
162
|
getJwk(keyPem: PrivateKeyBuffer | PrivateKeyString | PublicKeyBuffer | PublicKeyString): RsaPublicJwk | EcdsaPublicJwk;
|
|
163
163
|
splitPemChain(chainPem: CertificateBuffer | CertificateString): string[];
|
|
164
164
|
getPemBodyAsB64u(pem: CertificateBuffer | CertificateString): string;
|
|
165
165
|
readCsrDomains(csrPem: CsrBuffer | CsrString): CertificateDomains;
|
|
166
166
|
readCertificateInfo(certPem: CertificateBuffer | CertificateString): CertificateInfo;
|
|
167
|
-
createCsr(data: CsrOptions, keyPem?: PrivateKeyBuffer | PrivateKeyString): Promise<[PrivateKeyBuffer, CsrBuffer]>;
|
|
167
|
+
createCsr(data: CsrOptions, keyPem?: PrivateKeyBuffer | PrivateKeyString,encodingType?:string): Promise<[PrivateKeyBuffer, CsrBuffer]>;
|
|
168
168
|
createAlpnCertificate(authz: Authorization, keyAuthorization: string, keyPem?: PrivateKeyBuffer | PrivateKeyString): Promise<[PrivateKeyBuffer, CertificateBuffer]>;
|
|
169
169
|
isAlpnCertificateAuthorizationValid(certPem: CertificateBuffer | CertificateString, keyAuthorization: string): boolean;
|
|
170
170
|
}
|