@small-tech/auto-encrypt 2.2.0 → 2.3.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/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Adds automatic provisioning and renewal of [Let’s Encrypt](https://letsencrypt.org) TLS certificates with [OCSP Stapling](https://letsencrypt.org/docs/integration-guide/#implement-ocsp-stapling) to [Node.js](https://nodejs.org) [https](https://nodejs.org/dist/latest-v12.x/docs/api/https.html) servers (including [Express.js](https://expressjs.com/), etc.)
4
4
 
5
+ __Note:__ this is the CommonJS (CJS) branch of Auto Encrypt. Please see the main branch for the ECMAScript Modules (ESM) version. Security updates are backported to this branch.
6
+
5
7
  ## How it works
6
8
 
7
9
  The first time your web site is hit, it will take a couple of seconds to load as your Let’s Encrypt TLS certificates are automatically provisioned for you. From there on, your certificates will be seamlessly renewed 30 days before their expiry date.
@@ -11,7 +13,7 @@ When not provisioning certificates, Auto Encrypt will also forward HTTP calls to
11
13
  ## Installation
12
14
 
13
15
  ```sh
14
- npm i @small-tech/auto-encrypt
16
+ npm i @small-tech/auto-encrypt@cjs
15
17
  ```
16
18
 
17
19
  ## Usage
@@ -266,7 +268,7 @@ We exist in part thanks to patronage by people like you. If you share [our visio
266
268
 
267
269
  ## Copyright
268
270
 
269
- © 2020 [Aral Balkan](https://ar.al), [Small Technology Foundation](https://small-tech.org).
271
+ © 2020 - present [Aral Balkan](https://ar.al), [Small Technology Foundation](https://small-tech.org).
270
272
 
271
273
  Let’s Encrypt is a trademark of the Internet Security Research Group (ISRG). All rights reserved. Node.js is a trademark of Joyent, Inc. and is used with its permission. We are not endorsed by or affiliated with Joyent or ISRG.
272
274
 
package/lib/acmeCsr.js CHANGED
@@ -62,7 +62,7 @@ function csrAsPem (domains, key) {
62
62
  }]
63
63
  }])
64
64
 
65
- csr.sign(keys.private)
65
+ csr.sign(keys.private, forge.md.sha256.create())
66
66
 
67
67
  const pem = forge.pki.certificationRequestToPem(csr)
68
68
  return pem
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@small-tech/auto-encrypt",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Adds automatic provisioning and renewal of Let’s Encrypt TLS certificates with OCSP Stapling to Node.js https servers (including Express.js, etc.)",
5
5
  "keywords": [
6
6
  "let's encrypt",
@@ -64,7 +64,7 @@
64
64
  "fs-extra": "^8.1.0",
65
65
  "jose": "^1.24.0",
66
66
  "moment": "^2.24.0",
67
- "node-forge": "^0.10.0",
67
+ "node-forge": "^1.3.1",
68
68
  "ocsp": "^1.2.0",
69
69
  "server-destroy": "^1.0.1"
70
70
  },
package/CHANGELOG.md DELETED
@@ -1,101 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
-
7
- ## [2.2.0] - 2021-03-08
8
-
9
- ### Changed
10
-
11
- - Now includes the latest Let’s Encrypt certificate authority root certificate for the staging environment. (This is automatically injected into your Node.js environment when running the server in staging mode and is used during testing.)
12
-
13
- ### Fixed
14
-
15
- - No longer crashes when checking for certificate renewal. (#34)
16
-
17
- ### Improved
18
-
19
- - npm package size is now 199.7kb (down from 345kb previously).
20
-
21
- ## [2.0.6] - 2021-02-16
22
-
23
- ### Fixed
24
-
25
- - Assignment to constant. This would have caused a crash when a `Retry-After` header was received from Let’s Encrypt.
26
-
27
- ### Improved
28
-
29
- - Developer documentation. Now lists value to be added to hosts files to run local tests.
30
-
31
- ## [2.0.5] - 2020-10-29
32
-
33
- ### Improved
34
-
35
- - Update dependencies to remove npm vulnerability warnings.
36
-
37
- ## [2.0.4] - 2020-07-10
38
-
39
- ### Fixed
40
-
41
- - HTTP to HTTPS redirects now start up and work as they should (they weren’t previously).
42
-
43
- ## [2.0.3] - 2020-07-10
44
-
45
- ### Changed
46
-
47
- - Update source code repository in npm package to point to GitHub mirror. (The GitHub mirror is the public repository where we can accept issues and pull requests. [The canonical repository](https://source.small-tech.org/site.js/lib/auto-encrypt) is on our own server where we do not accept sign ups as we don’t want it to become yet another centralised host.)
48
-
49
- ## [2.0.2] - 2020-07-10
50
-
51
- ### Fixed
52
-
53
- - Links to developer documentation now work everywhere, not just on source code repository web interfaces.
54
-
55
- ### Changed
56
-
57
- - Replaced outdated coverage message in readme and linked to developer documentation for information on tests and coverage.
58
-
59
- ## [2.0.1] - 2020-07-03
60
-
61
- ### Added
62
-
63
- - HTTP to HTTPS redirects are now logged.
64
-
65
- ## [2.0.0] - 2020-07-03
66
-
67
- ### Changed
68
-
69
- - Breaking change: you no longer have to call AutoEncrypt.shutdown() manually. Closing your server will do it automatically (#33).
70
-
71
- ### Added
72
-
73
- - Automatic HTTP to HTTPS redirection. An HTTP server is now kept running for the lifetime of your HTTPS server and, when it is not responding to Let’s Encrypt challenges, it redirects HTTP calls on port 80 to your HTTPS server (#32).
74
-
75
- ## [1.0.3] - 2020-06-20
76
-
77
- ### Fixed
78
-
79
- - Carriage returns are now stripped from Certificate Signing Requests (CSRs) (#31).
80
-
81
- ## [1.0.2] - 2020-06-16
82
-
83
- ### Fixed
84
-
85
- - No longer crashes if OCSP request received before certificate created.
86
- - Cosmetic: format certificate details nicely in log message.
87
- - Minor: fix capitalisation in log message.
88
-
89
- ## [1.0.1] - 2020-06-15
90
-
91
- ### Changed
92
-
93
- - Update log format to match Site.js output.
94
-
95
- ### Fixed
96
-
97
- - Remove debug output.
98
-
99
- ## [1.0.0] - 2020-04-15
100
-
101
- Initial release.