node-forge 0.10.0 → 1.2.1

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,7 +1,88 @@
1
1
  Forge ChangeLog
2
2
  ===============
3
3
 
4
- ## 0.10.0 - 2019-09-01
4
+ ## 1.2.1 - 2022-01-11
5
+
6
+ ### Fixed
7
+ - [tests]: Load entire module to improve top-level testing and coverage
8
+ reporting.
9
+ - [log]: Refactor logging setup to avoid use of `URLSearchParams`.
10
+
11
+ ## 1.2.0 - 2022-01-07
12
+
13
+ ### Fixed
14
+ - [x509] 'Expected' and 'Actual' issuers were backwards in verification failure
15
+ message.
16
+
17
+ ### Added
18
+ - [oid,x509]: Added OID `1.3.14.3.2.29 / sha1WithRSASignature` for sha1 with
19
+ RSA. Considered a deprecated equivalent to `1.2.840.113549.1.1.5 /
20
+ sha1WithRSAEncryption`. See [discussion and
21
+ links](https://github.com/digitalbazaar/forge/issues/825).
22
+
23
+ ### Changed
24
+ - [x509]: Reduce duplicate code. Add helper function to create a signature
25
+ digest given an signature algorithm OID. Add helper function to verify
26
+ signatures.
27
+
28
+ ## 1.1.0 - 2022-01-06
29
+
30
+ ### Fixed
31
+ - [x509]: Correctly compute certificate issuer and subject hashes to match
32
+ behavior of openssl.
33
+ - [pem]: Accept certificate requests with "NEW" in the label. "BEGIN NEW
34
+ CERTIFICATE REQUEST" handled as "BEGIN CERTIFICATE REQUEST".
35
+
36
+ ## 1.0.0 - 2022-01-04
37
+
38
+ ### Notes
39
+ - **1.0.0**!
40
+ - This project is over a decade old! Time for a 1.0.0 release.
41
+ - The URL related changes may expose bugs in some of the networking related
42
+ code (unrelated to the much wider used cryptography code). The automated and
43
+ manual test coverage for this code is weak at best. Issues or patches to
44
+ update the code or tests would be appreciated.
45
+
46
+ ### Removed
47
+ - **SECURITY**, **BREAKING**: Remove `forge.debug` API. The API has the
48
+ potential for prototype pollution. This API was only briefly used by the
49
+ maintainers for internal project debug purposes and was never intended to be
50
+ used with untrusted user inputs. This API was not documented or advertised
51
+ and is being removed rather than fixed.
52
+ - **SECURITY**, **BREAKING**: Remove `forge.util.parseUrl()` (and
53
+ `forge.http.parseUrl` alias) and use the [WHATWG URL
54
+ Standard](https://url.spec.whatwg.org/). `URL` is supported by modern browers
55
+ and modern Node.js. This change is needed to address URL parsing security
56
+ issues. If `forge.util.parseUrl()` is used directly or through `forge.xhr` or
57
+ `forge.http` APIs, and support is needed for environments without `URL`
58
+ support, then a polyfill must be used.
59
+ - **BREAKING**: Remove `forge.task` API. This API was never used, documented,
60
+ or advertised by the maintainers. If anyone was using this API and wishes to
61
+ continue development it in other project, please let the maintainers know.
62
+ Due to use in the test suite, a modified version is located in
63
+ `tests/support/`.
64
+ - **BREAKING**: Remove `forge.util.makeLink`, `forge.util.makeRequest`,
65
+ `forge.util.parseFragment`, `forge.util.getQueryVariables`. Replace with
66
+ `URL`, `URLSearchParams`, and custom code as needed.
67
+
68
+ ### Changed
69
+ - **BREAKING**: Increase supported Node.js version to 6.13.0 for URL support.
70
+ - **BREAKING**: Renamed `master` branch to `main`.
71
+ - **BREAKING**: Release process updated to use tooling that prefixes versions
72
+ with `v`. Other tools, scripts, or scanners may need to adapt.
73
+ - **BREAKING**: Remove docs related to Bower and
74
+ [forge-dist](https://github.com/digitalbazaar/forge-dist). Install using
75
+ [another method](./README.md#installation).
76
+
77
+ ### Added
78
+ - OIDs for `surname`, `title`, and `givenName`.
79
+
80
+ ### Fixed
81
+ - **BREAKING**: OID 2.5.4.5 name fixed from `serialName` to `serialNumber`.
82
+ Depending on how applications used this id to name association it could cause
83
+ compatibility issues.
84
+
85
+ ## 0.10.0 - 2020-09-01
5
86
 
6
87
  ### Changed
7
88
  - **BREAKING**: Node.js 4 no longer supported. The code *may* still work, and
@@ -15,11 +96,11 @@ Forge ChangeLog
15
96
  from an early time when `forge` was targeted at providing general helper
16
97
  functions. The library direction changed to be more focused on cryptography.
17
98
  Many other excellent libraries are more suitable for general utilities. If
18
- you need a replacement for these functions, consier `get`, `set`, and `unset`
99
+ you need a replacement for these functions, consider `get`, `set`, and `unset`
19
100
  from [lodash](https://lodash.com/). But also consider the potential similar
20
101
  security issues with those APIs.
21
102
 
22
- ## 0.9.2 - 2019-09-01
103
+ ## 0.9.2 - 2020-09-01
23
104
 
24
105
  ### Changed
25
106
  - Added `util.setPath` security note to function docs and to README.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm package](https://nodei.co/npm/node-forge.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/node-forge/)
4
4
 
5
- [![Build status](https://img.shields.io/travis/digitalbazaar/forge.svg?branch=master)](https://travis-ci.org/digitalbazaar/forge)
5
+ [![Build Status](https://github.com/digitalbazaar/forge/workflows/Main%20Checks/badge.svg)](https://github.com/digitalbazaar/forge/actions?query=workflow%3A%22Main+Checks%22)
6
6
 
7
7
  A native implementation of [TLS][] (and various other cryptographic tools) in
8
8
  [JavaScript][].
@@ -80,7 +80,6 @@ Documentation
80
80
  * [Tasks](#task)
81
81
  * [Utilities](#util)
82
82
  * [Logging](#log)
83
- * [Debugging](#debug)
84
83
  * [Flash Networking Support](#flash)
85
84
 
86
85
  ### Other
@@ -106,7 +105,7 @@ not be regularly updated.
106
105
 
107
106
  If you want to use forge with [Node.js][], it is available through `npm`:
108
107
 
109
- https://npmjs.org/package/node-forge
108
+ https://www.npmjs.com/package/node-forge
110
109
 
111
110
  Installation:
112
111
 
@@ -121,24 +120,12 @@ var forge = require('node-forge');
121
120
  The npm package includes pre-built `forge.min.js`, `forge.all.min.js`, and
122
121
  `prime.worker.min.js` using the [UMD][] format.
123
122
 
124
- ### Bundle / Bower
125
-
126
- Each release is published in a separate repository as pre-built and minimized
127
- basic forge bundles using the [UMD][] format.
128
-
129
- https://github.com/digitalbazaar/forge-dist
130
-
131
- This bundle can be used in many environments. In particular it can be installed
132
- with [Bower][]:
133
-
134
- bower install forge
135
-
136
123
  ### jsDelivr CDN
137
124
 
138
125
  To use it via [jsDelivr](https://www.jsdelivr.com/package/npm/node-forge) include this in your html:
139
126
 
140
127
  ```html
141
- <script src="https://cdn.jsdelivr.net/npm/node-forge@0.7.0/dist/forge.min.js"></script>
128
+ <script src="https://cdn.jsdelivr.net/npm/node-forge@1.0.0/dist/forge.min.js"></script>
142
129
  ```
143
130
 
144
131
  ### unpkg CDN
@@ -146,7 +133,7 @@ To use it via [jsDelivr](https://www.jsdelivr.com/package/npm/node-forge) includ
146
133
  To use it via [unpkg](https://unpkg.com/#/) include this in your html:
147
134
 
148
135
  ```html
149
- <script src="https://unpkg.com/node-forge@0.7.0/dist/forge.min.js"></script>
136
+ <script src="https://unpkg.com/node-forge@1.0.0/dist/forge.min.js"></script>
150
137
  ```
151
138
 
152
139
  ### Development Requirements
@@ -1452,7 +1439,7 @@ __Examples__
1452
1439
 
1453
1440
  ```js
1454
1441
  // generate a key pair
1455
- var keys = forge.pki.rsa.generateKeyPair(1024);
1442
+ var keys = forge.pki.rsa.generateKeyPair(2048);
1456
1443
 
1457
1444
  // create a certification request (CSR)
1458
1445
  var csr = forge.pki.createCertificationRequest();
@@ -1969,10 +1956,6 @@ var nodeBuffer = Buffer.from(forgeBuffer.getBytes(), 'binary');
1969
1956
  // make sure you specify the encoding as 'binary'
1970
1957
  var nodeBuffer = Buffer.from('CAFE', 'hex');
1971
1958
  var forgeBuffer = forge.util.createBuffer(nodeBuffer.toString('binary'));
1972
-
1973
- // parse a URL
1974
- var parsed = forge.util.parseUrl('http://example.com/foo?bar=baz');
1975
- // parsed.scheme, parsed.host, parsed.port, parsed.path, parsed.fullHost
1976
1959
  ```
1977
1960
 
1978
1961
  <a name="log" />
@@ -1988,19 +1971,6 @@ __Examples__
1988
1971
  // TODO
1989
1972
  ```
1990
1973
 
1991
- <a name="debug" />
1992
-
1993
- ### Debugging
1994
-
1995
- Provides storage of debugging information normally inaccessible in
1996
- closures for viewing/investigation.
1997
-
1998
- __Examples__
1999
-
2000
- ```js
2001
- // TODO
2002
- ```
2003
-
2004
1974
  <a name="flash" />
2005
1975
 
2006
1976
  ### Flash Networking Support
@@ -2021,8 +1991,8 @@ When using this code please keep the following in mind:
2021
1991
  runtime characteristics, runtime optimization, code optimization, code
2022
1992
  minimization, code obfuscation, bundling tools, possible bugs, the Forge code
2023
1993
  itself, and so on.
2024
- - If using pre-built bundles from [Bower][] or similar be aware someone else
2025
- ran the tools to create those files.
1994
+ - If using pre-built bundles from [NPM][], another CDN, or similar, be aware
1995
+ someone else ran the tools to create those files.
2026
1996
  - Use a secure transport channel such as [TLS][] to load scripts and consider
2027
1997
  using additional security mechanisms such as [Subresource Integrity][] script
2028
1998
  attributes.
@@ -2048,7 +2018,8 @@ Contact
2048
2018
  * Code: https://github.com/digitalbazaar/forge
2049
2019
  * Bugs: https://github.com/digitalbazaar/forge/issues
2050
2020
  * Email: support@digitalbazaar.com
2051
- * IRC: [#forgejs][] on [freenode][]
2021
+ * IRC: [#forgejs][] on [Libera.Chat][] (people may also be on [freenode][] for
2022
+ historical reasons).
2052
2023
 
2053
2024
  Donations
2054
2025
  ---------
@@ -2063,7 +2034,6 @@ Financial support is welcome and helps contribute to futher development:
2063
2034
  [3DES]: https://en.wikipedia.org/wiki/Triple_DES
2064
2035
  [AES]: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
2065
2036
  [ASN.1]: https://en.wikipedia.org/wiki/ASN.1
2066
- [Bower]: https://bower.io/
2067
2037
  [Browserify]: http://browserify.org/
2068
2038
  [CBC]: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation
2069
2039
  [CFB]: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation
@@ -2076,7 +2046,9 @@ Financial support is welcome and helps contribute to futher development:
2076
2046
  [HMAC]: https://en.wikipedia.org/wiki/HMAC
2077
2047
  [JavaScript]: https://en.wikipedia.org/wiki/JavaScript
2078
2048
  [Karma]: https://karma-runner.github.io/
2049
+ [Libera.Chat]: https://libera.chat/
2079
2050
  [MD5]: https://en.wikipedia.org/wiki/MD5
2051
+ [NPM]: https://www.npmjs.com/
2080
2052
  [Node.js]: https://nodejs.org/
2081
2053
  [OFB]: https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation
2082
2054
  [PKCS#10]: https://en.wikipedia.org/wiki/Certificate_signing_request