@cocreate/acme 1.2.12 → 1.2.14

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.2.14](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.2.13...v1.2.14) (2024-07-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * convert key to string before saving ([a8b80c7](https://github.com/CoCreate-app/CoCreate-acme/commit/a8b80c7c5f37d2ed2b401509b1889faad6f79407))
7
+
8
+ ## [1.2.13](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.2.12...v1.2.13) (2024-06-23)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bump dependencies ([a10999f](https://github.com/CoCreate-app/CoCreate-acme/commit/a10999f40dd93bc007f4658e6b278b40c905f440))
14
+
1
15
  ## [1.2.12](https://github.com/CoCreate-app/CoCreate-acme/compare/v1.2.11...v1.2.12) (2024-06-23)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/acme",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "Dynamic SSL certificate management leveraging the ACME protocol, designed for direct API accessibility within applications. Automates certificate creation, renewal, and retrieval, ideal for distributed applications requiring real-time, secure certificate operations.",
5
5
  "keywords": [
6
6
  "acme",
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ class CoCreateAcme {
89
89
  const domains = wildcard ? [host, `*.${host}`] : [host];
90
90
 
91
91
  /* Create certificate request */
92
- const [key, csr] = await forge.createCsr({
92
+ let [key, csr] = await forge.createCsr({
93
93
  commonName: domains[0],
94
94
  altNames: domains
95
95
  });
@@ -169,6 +169,8 @@ class CoCreateAcme {
169
169
  expires = expires.notAfter;
170
170
  this.setCertificate(host, expires, organization_id, hostKeyPath, cert, key)
171
171
 
172
+ key = key.toString('utf8');
173
+
172
174
  this.crud.send({
173
175
  method: 'object.update',
174
176
  host,