From 111a0823e9b24405403930e1fcc3836847686f9a Mon Sep 17 00:00:00 2001
From: xiaojunnuo Generate a private ECDSA key Get a public key derived from a RSA or ECDSA key Parse body of PEM encoded object and return a Base64URL string
+If multiple objects are chained, the first body will be returned Read domains from a Certificate Signing Request Read information from a certificate
+If multiple certificates are chained, the first will be read Create a Certificate Signing Request Create a self-signed ALPN certificate for TLS-ALPN-01 challenges Validate that a ALPN certificate contains the expected key authorization Alias of Generate a private ECDSA key Get a public key derived from a RSA or ECDSA key Get a JSON Web Key derived from a RSA or ECDSA key Split chain of PEM encoded objects from string into array Parse body of PEM encoded object and return a Base64URL string
-If multiple objects are chained, the first body will be returned Read domains from a Certificate Signing Request Read information from a certificate
-If multiple certificates are chained, the first will be read Create a Certificate Signing Request Create a self-signed ALPN certificate for TLS-ALPN-01 challenges Validate that a ALPN certificate contains the expected key authorization
+
+
## Functions
Promise.<buffer>bufferstringobjectobjectPromise.<Array.<buffer>>Promise.<Array.<buffer>>boolean
@@ -15,12 +47,6 @@
@@ -57,40 +62,12 @@ If multiple certificates are chained, the first will be readcreatePrivateRsaKey()Promise.<buffer>bufferobjectArray.<string>stringobjectobjectPromise.<Array.<buffer>>Promise.<Array.<buffer>>boolean
Promise.<buffer>
-Generate a private RSA key
-
-**Kind**: global function
-**Returns**: Promise.<buffer> - PEM encoded private RSA key
-
-| Param | Type | Default | Description |
-| --- | --- | --- | --- |
-| [modulusLength] | number | 2048 | Size of the keys modulus in bits, default: `2048` |
-
-**Example**
-Generate private RSA key
-```js
-const privateKey = await acme.crypto.createPrivateRsaKey();
-```
-**Example**
-Private RSA key with modulus size 4096
-```js
-const privateKey = await acme.crypto.createPrivateRsaKey(4096);
-```
-
-
-## createPrivateKey()
-Alias of `createPrivateRsaKey()`
-
-**Kind**: global function
-## createPrivateEcdsaKey([namedCurve]) ⇒ Promise.<buffer>
+## createPrivateEcdsaKey ⇒ Promise.<buffer>
Generate a private ECDSA key
-**Kind**: global function
+**Kind**: global constant
**Returns**: Promise.<buffer> - PEM encoded private ECDSA key
| Param | Type | Description |
@@ -109,10 +86,10 @@ const privateKey = await acme.crypto.createPrivateEcdsaKey('P-384');
```
-## getPublicKey(keyPem) ⇒ buffer
+## getPublicKey ⇒ buffer
Get a public key derived from a RSA or ECDSA key
-**Kind**: global function
+**Kind**: global constant
**Returns**: buffer - PEM encoded public key
| Param | Type | Description |
@@ -124,44 +101,13 @@ Get public key
```js
const publicKey = acme.crypto.getPublicKey(privateKey);
```
-
-
-## getJwk(keyPem) ⇒ object
-Get a JSON Web Key derived from a RSA or ECDSA key
-
-https://datatracker.ietf.org/doc/html/rfc7517
-
-**Kind**: global function
-**Returns**: object - JSON Web Key
-
-| Param | Type | Description |
-| --- | --- | --- |
-| keyPem | buffer \| string | PEM encoded private or public key |
-
-**Example**
-Get JWK
-```js
-const jwk = acme.crypto.getJwk(privateKey);
-```
-
-
-## splitPemChain(chainPem) ⇒ Array.<string>
-Split chain of PEM encoded objects from string into array
-
-**Kind**: global function
-**Returns**: Array.<string> - Array of PEM objects including headers
-
-| Param | Type | Description |
-| --- | --- | --- |
-| chainPem | buffer \| string | PEM encoded object chain |
-
-## getPemBodyAsB64u(pem) ⇒ string
+## getPemBodyAsB64u ⇒ string
Parse body of PEM encoded object and return a Base64URL string
If multiple objects are chained, the first body will be returned
-**Kind**: global function
+**Kind**: global constant
**Returns**: string - Base64URL-encoded body
| Param | Type | Description |
@@ -170,10 +116,10 @@ If multiple objects are chained, the first body will be returned
-## readCsrDomains(csrPem) ⇒ object
+## readCsrDomains ⇒ object
Read domains from a Certificate Signing Request
-**Kind**: global function
+**Kind**: global constant
**Returns**: object - {commonName, altNames}
| Param | Type | Description |
@@ -190,11 +136,11 @@ console.log(`Alt names: ${altNames.join(', ')}`);
```
-## readCertificateInfo(certPem) ⇒ object
+## readCertificateInfo ⇒ object
Read information from a certificate
If multiple certificates are chained, the first will be read
-**Kind**: global function
+**Kind**: global constant
**Returns**: object - Certificate info
| Param | Type | Description |
@@ -215,10 +161,10 @@ console.log(`Alt names: ${altNames.join(', ')}`);
```
-## createCsr(data, [keyPem]) ⇒ Promise.<Array.<buffer>>
+## createCsr ⇒ Promise.<Array.<buffer>>
Create a Certificate Signing Request
-**Kind**: global function
+**Kind**: global constant
**Returns**: Promise.<Array.<buffer>> - [privateKey, certificateSigningRequest]
| Param | Type | Description |
@@ -276,12 +222,12 @@ const [, certificateRequest] = await acme.crypto.createCsr({
```
-## createAlpnCertificate(authz, keyAuthorization, [keyPem]) ⇒ Promise.<Array.<buffer>>
+## createAlpnCertificate ⇒ Promise.<Array.<buffer>>
Create a self-signed ALPN certificate for TLS-ALPN-01 challenges
https://datatracker.ietf.org/doc/html/rfc8737
-**Kind**: global function
+**Kind**: global constant
**Returns**: Promise.<Array.<buffer>> - [privateKey, certificate]
| Param | Type | Description |
@@ -303,10 +249,10 @@ const [, alpnCertificate] = await acme.crypto.createAlpnCertificate(authz, keyAu
```
-## isAlpnCertificateAuthorizationValid(certPem, keyAuthorization) ⇒ boolean
+## isAlpnCertificateAuthorizationValid ⇒ boolean
Validate that a ALPN certificate contains the expected key authorization
-**Kind**: global function
+**Kind**: global constant
**Returns**: boolean - True when valid
| Param | Type | Description |
@@ -314,3 +260,62 @@ Validate that a ALPN certificate contains the expected key authorization
| certPem | buffer \| string | PEM encoded certificate |
| keyAuthorization | string | Expected challenge key authorization |
+
+
+## createPrivateRsaKey([modulusLength]) ⇒ Promise.<buffer>
+Generate a private RSA key
+
+**Kind**: global function
+**Returns**: Promise.<buffer> - PEM encoded private RSA key
+
+| Param | Type | Description |
+| --- | --- | --- |
+| [modulusLength] | number | Size of the keys modulus in bits, default: `2048` |
+
+**Example**
+Generate private RSA key
+```js
+const privateKey = await acme.crypto.createPrivateRsaKey();
+```
+**Example**
+Private RSA key with modulus size 4096
+```js
+const privateKey = await acme.crypto.createPrivateRsaKey(4096);
+```
+
+
+## createPrivateKey()
+Alias of `createPrivateRsaKey()`
+
+**Kind**: global function
+
+
+## getJwk(keyPem) ⇒ object
+Get a JSON Web Key derived from a RSA or ECDSA key
+
+https://datatracker.ietf.org/doc/html/rfc7517
+
+**Kind**: global function
+**Returns**: object - JSON Web Key
+
+| Param | Type | Description |
+| --- | --- | --- |
+| keyPem | buffer \| string | PEM encoded private or public key |
+
+**Example**
+Get JWK
+```js
+const jwk = acme.crypto.getJwk(privateKey);
+```
+
+
+## splitPemChain(chainPem) ⇒ Array.<string>
+Split chain of PEM encoded objects from string into array
+
+**Kind**: global function
+**Returns**: Array.<string> - Array of PEM objects including headers
+
+| Param | Type | Description |
+| --- | --- | --- |
+| chainPem | buffer \| string | PEM encoded object chain |
+
diff --git a/packages/core/acme-client/docs/forge.md b/packages/core/acme-client/docs/forge.md
index 65dcab8fd..799cc0e1c 100644
--- a/packages/core/acme-client/docs/forge.md
+++ b/packages/core/acme-client/docs/forge.md
@@ -8,37 +8,42 @@ major release. Please migrate to the new acme.crypto interface at y
+## Constants
+
+Promise.<buffer>Create public key from a private RSA key
+stringParse body of PEM encoded object from buffer or string +If multiple objects are chained, the first body will be returned
+Array.<string>Split chain of PEM encoded objects from buffer or string into array
+Promise.<buffer>Get modulus
+Promise.<buffer>Get public exponent
+Promise.<object>Read domains from a Certificate Signing Request
+Promise.<object>Read information from a certificate
+Promise.<Array.<buffer>>Create a Certificate Signing Request
+Promise.<buffer>Generate a private RSA key
Promise.<buffer>Create public key from a private RSA key
-stringParse body of PEM encoded object from buffer or string -If multiple objects are chained, the first body will be returned
-Array.<string>Split chain of PEM encoded objects from buffer or string into array
-Promise.<buffer>Get modulus
-Promise.<buffer>Get public exponent
-Promise.<object>Read domains from a Certificate Signing Request
-Promise.<object>Read information from a certificate
-Promise.<Array.<buffer>>Create a Certificate Signing Request
-Promise.<buffer>
-Generate a private RSA key
-
-**Kind**: global function
-**Returns**: Promise.<buffer> - PEM encoded private RSA key
-
-| Param | Type | Default | Description |
-| --- | --- | --- | --- |
-| [size] | number | 2048 | Size of the key, default: `2048` |
-
-**Example**
-Generate private RSA key
-```js
-const privateKey = await acme.forge.createPrivateKey();
-```
-**Example**
-Private RSA key with defined size
-```js
-const privateKey = await acme.forge.createPrivateKey(4096);
-```
-## createPublicKey(key) ⇒ Promise.<buffer>
+## createPublicKey ⇒ Promise.<buffer>
Create public key from a private RSA key
-**Kind**: global function
+**Kind**: global constant
**Returns**: Promise.<buffer> - PEM encoded public RSA key
| Param | Type | Description |
@@ -91,11 +74,11 @@ const publicKey = await acme.forge.createPublicKey(privateKey);
```
-## getPemBody(str) ⇒ string
+## getPemBody ⇒ string
Parse body of PEM encoded object from buffer or string
If multiple objects are chained, the first body will be returned
-**Kind**: global function
+**Kind**: global constant
**Returns**: string - PEM body
| Param | Type | Description |
@@ -104,10 +87,10 @@ If multiple objects are chained, the first body will be returned
-## splitPemChain(str) ⇒ Array.<string>
+## splitPemChain ⇒ Array.<string>
Split chain of PEM encoded objects from buffer or string into array
-**Kind**: global function
+**Kind**: global constant
**Returns**: Array.<string> - Array of PEM bodies
| Param | Type | Description |
@@ -116,10 +99,10 @@ Split chain of PEM encoded objects from buffer or string into array
-## getModulus(input) ⇒ Promise.<buffer>
+## getModulus ⇒ Promise.<buffer>
Get modulus
-**Kind**: global function
+**Kind**: global constant
**Returns**: Promise.<buffer> - Modulus
| Param | Type | Description |
@@ -135,10 +118,10 @@ const m3 = await acme.forge.getModulus(certificateRequest);
```
-## getPublicExponent(input) ⇒ Promise.<buffer>
+## getPublicExponent ⇒ Promise.<buffer>
Get public exponent
-**Kind**: global function
+**Kind**: global constant
**Returns**: Promise.<buffer> - Exponent
| Param | Type | Description |
@@ -154,10 +137,10 @@ const e3 = await acme.forge.getPublicExponent(certificateRequest);
```
-## readCsrDomains(csr) ⇒ Promise.<object>
+## readCsrDomains ⇒ Promise.<object>
Read domains from a Certificate Signing Request
-**Kind**: global function
+**Kind**: global constant
**Returns**: Promise.<object> - {commonName, altNames}
| Param | Type | Description |
@@ -174,10 +157,10 @@ console.log(`Alt names: ${altNames.join(', ')}`);
```
-## readCertificateInfo(cert) ⇒ Promise.<object>
+## readCertificateInfo ⇒ Promise.<object>
Read information from a certificate
-**Kind**: global function
+**Kind**: global constant
**Returns**: Promise.<object> - Certificate info
| Param | Type | Description |
@@ -198,10 +181,10 @@ console.log(`Alt names: ${altNames.join(', ')}`);
```
-## createCsr(data, [key]) ⇒ Promise.<Array.<buffer>>
+## createCsr ⇒ Promise.<Array.<buffer>>
Create a Certificate Signing Request
-**Kind**: global function
+**Kind**: global constant
**Returns**: Promise.<Array.<buffer>> - [privateKey, certificateSigningRequest]
| Param | Type | Description |
@@ -256,3 +239,25 @@ const certificateKey = await acme.forge.createPrivateKey();
const [, certificateRequest] = await acme.forge.createCsr({
altNames: ['test.example.com'],
}, certificateKey);
+
+
+## createPrivateKey([size]) ⇒ Promise.<buffer>
+Generate a private RSA key
+
+**Kind**: global function
+**Returns**: Promise.<buffer> - PEM encoded private RSA key
+
+| Param | Type | Description |
+| --- | --- | --- |
+| [size] | number | Size of the key, default: `2048` |
+
+**Example**
+Generate private RSA key
+```js
+const privateKey = await acme.forge.createPrivateKey();
+```
+**Example**
+Private RSA key with defined size
+```js
+const privateKey = await acme.forge.createPrivateKey(4096);
+```
diff --git a/packages/core/acme-client/package.json b/packages/core/acme-client/package.json
index 3728b42ad..5ba0b4cff 100644
--- a/packages/core/acme-client/package.json
+++ b/packages/core/acme-client/package.json
@@ -65,5 +65,5 @@
"bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues"
},
- "gitHead": "3a0178b2949083c770ed96a4122e4c0a5e0bcc11"
+ "gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
}
diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json
index fad1a1132..3b61755cc 100644
--- a/packages/core/basic/package.json
+++ b/packages/core/basic/package.json
@@ -43,5 +43,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
- "gitHead": "3a0178b2949083c770ed96a4122e4c0a5e0bcc11"
+ "gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
}
diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json
index ae338d5e4..28e8dd349 100644
--- a/packages/core/pipeline/package.json
+++ b/packages/core/pipeline/package.json
@@ -43,5 +43,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
- "gitHead": "3a0178b2949083c770ed96a4122e4c0a5e0bcc11"
+ "gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
}
diff --git a/packages/libs/lib-huawei/package.json b/packages/libs/lib-huawei/package.json
index febbcef82..93aa99328 100644
--- a/packages/libs/lib-huawei/package.json
+++ b/packages/libs/lib-huawei/package.json
@@ -21,5 +21,5 @@
"prettier": "^2.8.8",
"tslib": "^2.8.1"
},
- "gitHead": "3a0178b2949083c770ed96a4122e4c0a5e0bcc11"
+ "gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
}
diff --git a/packages/libs/lib-iframe/package.json b/packages/libs/lib-iframe/package.json
index 4fe4d4dfb..c541b9573 100644
--- a/packages/libs/lib-iframe/package.json
+++ b/packages/libs/lib-iframe/package.json
@@ -30,5 +30,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
- "gitHead": "3a0178b2949083c770ed96a4122e4c0a5e0bcc11"
+ "gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
}
diff --git a/packages/libs/lib-k8s/package.json b/packages/libs/lib-k8s/package.json
index 273236449..11f780288 100644
--- a/packages/libs/lib-k8s/package.json
+++ b/packages/libs/lib-k8s/package.json
@@ -31,5 +31,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
- "gitHead": "3a0178b2949083c770ed96a4122e4c0a5e0bcc11"
+ "gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
}
diff --git a/packages/libs/lib-server/package.json b/packages/libs/lib-server/package.json
index 920d268b9..73ae901d9 100644
--- a/packages/libs/lib-server/package.json
+++ b/packages/libs/lib-server/package.json
@@ -61,5 +61,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
- "gitHead": "3a0178b2949083c770ed96a4122e4c0a5e0bcc11"
+ "gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
}
diff --git a/packages/libs/midway-flyway-js/package.json b/packages/libs/midway-flyway-js/package.json
index 4debc7355..e596697a8 100644
--- a/packages/libs/midway-flyway-js/package.json
+++ b/packages/libs/midway-flyway-js/package.json
@@ -46,5 +46,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
- "gitHead": "3a0178b2949083c770ed96a4122e4c0a5e0bcc11"
+ "gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
}
diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json
index e0181b5b3..a29fda348 100644
--- a/packages/plugins/plugin-cert/package.json
+++ b/packages/plugins/plugin-cert/package.json
@@ -40,5 +40,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
- "gitHead": "3a0178b2949083c770ed96a4122e4c0a5e0bcc11"
+ "gitHead": "1eb70d4cfd1ed2f746369658db2559fe01718324"
}