node-forge 1.3.0 → 1.3.2

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 DELETED
@@ -1,405 +0,0 @@
1
- Forge ChangeLog
2
- ===============
3
-
4
- ## 1.3.0 - 2022-03-17
5
-
6
- ### Security
7
- - Three RSA PKCS#1 v1.5 signature verification issues were reported by Moosa
8
- Yahyazadeh (moosa-yahyazadeh@uiowa.edu).
9
- - **HIGH**: Leniency in checking `digestAlgorithm` structure can lead to
10
- signature forgery.
11
- - The code is lenient in checking the digest algorithm structure. This can
12
- allow a crafted structure that steals padding bytes and uses unchecked
13
- portion of the PKCS#1 encoded message to forge a signature when a low
14
- public exponent is being used. For more information, please see
15
- ["Bleichenbacher's RSA signature forgery based on implementation
16
- error"](https://mailarchive.ietf.org/arch/msg/openpgp/5rnE9ZRN1AokBVj3VqblGlP63QE/)
17
- by Hal Finney.
18
- - CVE ID: [CVE-2022-24771](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24771)
19
- - GHSA ID: [GHSA-cfm4-qjh2-4765](https://github.com/digitalbazaar/forge/security/advisories/GHSA-cfm4-qjh2-4765)
20
- - **HIGH**: Failing to check tailing garbage bytes can lead to signature
21
- forgery.
22
- - The code does not check for tailing garbage bytes after decoding a
23
- `DigestInfo` ASN.1 structure. This can allow padding bytes to be removed
24
- and garbage data added to forge a signature when a low public exponent is
25
- being used. For more information, please see ["Bleichenbacher's RSA
26
- signature forgery based on implementation
27
- error"](https://mailarchive.ietf.org/arch/msg/openpgp/5rnE9ZRN1AokBVj3VqblGlP63QE/)
28
- by Hal Finney.
29
- - CVE ID: [CVE-2022-24772](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24772)
30
- - GHSA ID: [GHSA-x4jg-mjrx-434g](https://github.com/digitalbazaar/forge/security/advisories/GHSA-x4jg-mjrx-434g)
31
- - **MEDIUM**: Leniency in checking type octet.
32
- - `DigestInfo` is not properly checked for proper ASN.1 structure. This can
33
- lead to successful verification with signatures that contain invalid
34
- structures but a valid digest.
35
- - CVE ID: [CVE-2022-24773](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-24773)
36
- - GHSA ID: [GHSA-2r2c-g63r-vccr](https://github.com/digitalbazaar/forge/security/advisories/GHSA-2r2c-g63r-vccr)
37
-
38
- ### Fixed
39
- - [asn1] Add fallback to pretty print invalid UTF8 data.
40
- - [asn1] `fromDer` is now more strict and will default to ensuring all input
41
- bytes are parsed or throw an error. A new option `parseAllBytes` can disable
42
- this behavior.
43
- - **NOTE**: The previous behavior is being changed since it can lead to
44
- security issues with crafted inputs. It is possible that code doing custom
45
- DER parsing may need to adapt to this new behavior and optional flag.
46
- - [rsa] Add and use a validator to check for proper structure of parsed ASN.1
47
- `RSASSA-PKCS-v1_5` `DigestInfo` data. Additionally check that the hash
48
- algorithm identifier is a known value from RFC 8017
49
- `PKCS1-v1-5DigestAlgorithms`. An invalid `DigestInfo` or algorithm identifier
50
- will now throw an error.
51
- - **NOTE**: The previous lenient behavior is being changed to be more strict
52
- since it could lead to security issues with crafted inputs. It is possible
53
- that code may have to handle the errors from these stricter checks.
54
-
55
- ### Added
56
- - [oid] Added missing RFC 8017 PKCS1-v1-5DigestAlgorithms algorithm
57
- identifiers:
58
- - `1.2.840.113549.2.2` / `md2`
59
- - `2.16.840.1.101.3.4.2.4` / `sha224`
60
- - `2.16.840.1.101.3.4.2.5` / `sha512-224`
61
- - `2.16.840.1.101.3.4.2.6` / `sha512-256`
62
-
63
- ## 1.2.1 - 2022-01-11
64
-
65
- ### Fixed
66
- - [tests]: Load entire module to improve top-level testing and coverage
67
- reporting.
68
- - [log]: Refactor logging setup to avoid use of `URLSearchParams`.
69
-
70
- ## 1.2.0 - 2022-01-07
71
-
72
- ### Fixed
73
- - [x509] 'Expected' and 'Actual' issuers were backwards in verification failure
74
- message.
75
-
76
- ### Added
77
- - [oid,x509]: Added OID `1.3.14.3.2.29 / sha1WithRSASignature` for sha1 with
78
- RSA. Considered a deprecated equivalent to `1.2.840.113549.1.1.5 /
79
- sha1WithRSAEncryption`. See [discussion and
80
- links](https://github.com/digitalbazaar/forge/issues/825).
81
-
82
- ### Changed
83
- - [x509]: Reduce duplicate code. Add helper function to create a signature
84
- digest given an signature algorithm OID. Add helper function to verify
85
- signatures.
86
-
87
- ## 1.1.0 - 2022-01-06
88
-
89
- ### Fixed
90
- - [x509]: Correctly compute certificate issuer and subject hashes to match
91
- behavior of openssl.
92
- - [pem]: Accept certificate requests with "NEW" in the label. "BEGIN NEW
93
- CERTIFICATE REQUEST" handled as "BEGIN CERTIFICATE REQUEST".
94
-
95
- ## 1.0.0 - 2022-01-04
96
-
97
- ### Notes
98
- - **1.0.0**!
99
- - This project is over a decade old! Time for a 1.0.0 release.
100
- - The URL related changes may expose bugs in some of the networking related
101
- code (unrelated to the much wider used cryptography code). The automated and
102
- manual test coverage for this code is weak at best. Issues or patches to
103
- update the code or tests would be appreciated.
104
-
105
- ### Removed
106
- - **SECURITY**, **BREAKING**: Remove `forge.debug` API. The API has the
107
- potential for prototype pollution. This API was only briefly used by the
108
- maintainers for internal project debug purposes and was never intended to be
109
- used with untrusted user inputs. This API was not documented or advertised
110
- and is being removed rather than fixed.
111
- - **SECURITY**, **BREAKING**: Remove `forge.util.parseUrl()` (and
112
- `forge.http.parseUrl` alias) and use the [WHATWG URL
113
- Standard](https://url.spec.whatwg.org/). `URL` is supported by modern browers
114
- and modern Node.js. This change is needed to address URL parsing security
115
- issues. If `forge.util.parseUrl()` is used directly or through `forge.xhr` or
116
- `forge.http` APIs, and support is needed for environments without `URL`
117
- support, then a polyfill must be used.
118
- - **BREAKING**: Remove `forge.task` API. This API was never used, documented,
119
- or advertised by the maintainers. If anyone was using this API and wishes to
120
- continue development it in other project, please let the maintainers know.
121
- Due to use in the test suite, a modified version is located in
122
- `tests/support/`.
123
- - **BREAKING**: Remove `forge.util.makeLink`, `forge.util.makeRequest`,
124
- `forge.util.parseFragment`, `forge.util.getQueryVariables`. Replace with
125
- `URL`, `URLSearchParams`, and custom code as needed.
126
-
127
- ### Changed
128
- - **BREAKING**: Increase supported Node.js version to 6.13.0 for URL support.
129
- - **BREAKING**: Renamed `master` branch to `main`.
130
- - **BREAKING**: Release process updated to use tooling that prefixes versions
131
- with `v`. Other tools, scripts, or scanners may need to adapt.
132
- - **BREAKING**: Remove docs related to Bower and
133
- [forge-dist](https://github.com/digitalbazaar/forge-dist). Install using
134
- [another method](./README.md#installation).
135
-
136
- ### Added
137
- - OIDs for `surname`, `title`, and `givenName`.
138
-
139
- ### Fixed
140
- - **BREAKING**: OID 2.5.4.5 name fixed from `serialName` to `serialNumber`.
141
- Depending on how applications used this id to name association it could cause
142
- compatibility issues.
143
-
144
- ## 0.10.0 - 2020-09-01
145
-
146
- ### Changed
147
- - **BREAKING**: Node.js 4 no longer supported. The code *may* still work, and
148
- non-invasive patches to keep it working will be considered. However, more
149
- modern tools no longer support old Node.js versions making testing difficult.
150
-
151
- ### Removed
152
- - **BREAKING**: Remove `util.getPath`, `util.setPath`, and `util.deletePath`.
153
- `util.setPath` had a potential prototype pollution security issue when used
154
- with unsafe inputs. These functions are not used by `forge` itself. They date
155
- from an early time when `forge` was targeted at providing general helper
156
- functions. The library direction changed to be more focused on cryptography.
157
- Many other excellent libraries are more suitable for general utilities. If
158
- you need a replacement for these functions, consider `get`, `set`, and `unset`
159
- from [lodash](https://lodash.com/). But also consider the potential similar
160
- security issues with those APIs.
161
-
162
- ## 0.9.2 - 2020-09-01
163
-
164
- ### Changed
165
- - Added `util.setPath` security note to function docs and to README.
166
-
167
- ### Notes
168
- - **SECURITY**: The `util.setPath` function has the potential to cause
169
- prototype pollution if used with unsafe input.
170
- - This function is **not** used internally by `forge`.
171
- - The rest of the library is unaffected by this issue.
172
- - **Do not** use unsafe input with this function.
173
- - Usage with known input should function as expected. (Including input
174
- intentionally using potentially problematic keys.)
175
- - No code changes will be made to address this issue in 0.9.x. The current
176
- behavior *could* be considered a feature rather than a security issue.
177
- 0.10.0 will be released that removes `util.getPath` and `util.setPath`.
178
- Consider `get` and `set` from [lodash](https://lodash.com/) if you need
179
- replacements. But also consider the potential similar security issues with
180
- those APIs.
181
- - https://snyk.io/vuln/SNYK-JS-NODEFORGE-598677
182
- - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7720
183
-
184
- ## 0.9.1 - 2019-09-26
185
-
186
- ### Fixed
187
- - Ensure DES-CBC given IV is long enough for block size.
188
-
189
- ## 0.9.0 - 2019-09-04
190
-
191
- ### Added
192
- - Add ed25519.publicKeyFromAsn1 and ed25519.privateKeyFromAsn1 APIs.
193
- - A few OIDs used in EV certs.
194
-
195
- ### Fixed
196
- - Improve ed25519 NativeBuffer check.
197
-
198
- ## 0.8.5 - 2019-06-18
199
-
200
- ### Fixed
201
- - Remove use of `const`.
202
-
203
- ## 0.8.4 - 2019-05-22
204
-
205
- ### Changed
206
- - Replace all instances of Node.js `new Buffer` with `Buffer.from` and `Buffer.alloc`.
207
-
208
- ## 0.8.3 - 2019-05-15
209
-
210
- ### Fixed
211
- - Use basic character set for code.
212
-
213
- ## 0.8.2 - 2019-03-18
214
-
215
- ### Fixed
216
- - Fix tag calculation when continuing an AES-GCM block.
217
-
218
- ### Changed
219
- - Switch to eslint.
220
-
221
- ## 0.8.1 - 2019-02-23
222
-
223
- ### Fixed
224
- - Fix off-by-1 bug with kem random generation.
225
-
226
- ## 0.8.0 - 2019-01-31
227
-
228
- ### Fixed
229
- - Handle creation of certificates with `notBefore` and `notAfter` dates less
230
- than Jan 1, 1950 or greater than or equal to Jan 1, 2050.
231
-
232
- ### Added
233
- - Add OID 2.5.4.13 "description".
234
- - Add OID 2.16.840.1.113730.1.13 "nsComment".
235
- - Also handle extension when creating a certificate.
236
- - `pki.verifyCertificateChain`:
237
- - Add `validityCheckDate` option to allow checking the certificate validity
238
- period against an arbitrary `Date` or `null` for no check at all. The
239
- current date is used by default.
240
- - `tls.createConnection`:
241
- - Add `verifyOptions` option that passes through to
242
- `pki.verifyCertificateChain`. Can be used for the above `validityCheckDate`
243
- option.
244
-
245
- ### Changed
246
- - Support WebCrypto API in web workers.
247
- - `rsa.generateKeyPair`:
248
- - Use `crypto.generateKeyPair`/`crypto.generateKeyPairSync` on Node.js if
249
- available (10.12.0+) and not in pure JS mode.
250
- - Use JS fallback in `rsa.generateKeyPair` if `prng` option specified since
251
- this isn't supported by current native APIs.
252
- - Only run key generation comparison tests if keys will be deterministic.
253
- - PhantomJS is deprecated, now using Headless Chrome with Karma.
254
- - **Note**: Using Headless Chrome vs PhantomJS may cause newer JS features to
255
- slip into releases without proper support for older runtimes and browsers.
256
- Please report such issues and they will be addressed.
257
- - `pki.verifyCertificateChain`:
258
- - Signature changed to `(caStore, chain, options)`. Older `(caStore, chain,
259
- verify)` signature is still supported. New style is to to pass in a
260
- `verify` option.
261
-
262
- ## 0.7.6 - 2018-08-14
263
-
264
- ### Added
265
- - Test on Node.js 10.x.
266
- - Support for PKCS#7 detached signatures.
267
-
268
- ### Changed
269
- - Improve webpack/browser detection.
270
-
271
- ## 0.7.5 - 2018-03-30
272
-
273
- ### Fixed
274
- - Remove use of `const`.
275
-
276
- ## 0.7.4 - 2018-03-07
277
-
278
- ### Fixed
279
- - Potential regex denial of service in form.js.
280
-
281
- ### Added
282
- - Support for ED25519.
283
- - Support for baseN/base58.
284
-
285
- ## 0.7.3 - 2018-03-05
286
-
287
- - Re-publish with npm 5.6.0 due to file timestamp issues.
288
-
289
- ## 0.7.2 - 2018-02-27
290
-
291
- ### Added
292
- - Support verification of SHA-384 certificates.
293
- - `1.2.840.10040.4.3'`/`dsa-with-sha1` OID.
294
-
295
- ### Fixed
296
- - Support importing PKCS#7 data with no certificates. RFC 2315 sec 9.1 states
297
- certificates are optional.
298
- - `asn1.equals` loop bug.
299
- - Fortuna implementation bugs.
300
-
301
- ## 0.7.1 - 2017-03-27
302
-
303
- ### Fixed
304
-
305
- - Fix digestLength for hashes based on SHA-512.
306
-
307
- ## 0.7.0 - 2017-02-07
308
-
309
- ### Fixed
310
-
311
- - Fix test looping bugs so all tests are run.
312
- - Improved ASN.1 parsing. Many failure cases eliminated. More sanity checks.
313
- Better behavior in default mode of parsing BIT STRINGs. Better handling of
314
- parsed BIT STRINGs in `toDer()`. More tests.
315
- - Improve X.509 BIT STRING handling by using new capture modes.
316
-
317
- ### Changed
318
-
319
- - Major refactor to use CommonJS plus a browser build system.
320
- - Updated tests, examples, docs.
321
- - Updated dependencies.
322
- - Updated flash build system.
323
- - Improve OID mapping code.
324
- - Change test servers from Python to JavaScript.
325
- - Improve PhantomJS support.
326
- - Move Bower/bundle support to
327
- [forge-dist](https://github.com/digitalbazaar/forge-dist).
328
- - **BREAKING**: Require minimal digest algorithm dependencies from individual
329
- modules.
330
- - Enforce currently supported bit param values for byte buffer access. May be
331
- **BREAKING** for code that depended on unspecified and/or incorrect behavior.
332
- - Improve `asn1.prettyPrint()` BIT STRING display.
333
-
334
- ### Added
335
-
336
- - webpack bundler support via `npm run build`:
337
- - Builds `.js`, `.min.js`, and basic sourcemaps.
338
- - Basic build: `forge.js`.
339
- - Build with extra utils and networking support: `forge.all.js`.
340
- - Build WebWorker support: `prime.worker.js`.
341
- - Browserify support in package.json.
342
- - Karma browser testing.
343
- - `forge.options` field.
344
- - `forge.options.usePureJavaScript` flag.
345
- - `forge.util.isNodejs` flag (used to select "native" APIs).
346
- - Run PhantomJS tests in Travis-CI.
347
- - Add "Donations" section to README.
348
- - Add IRC to "Contact" section of README.
349
- - Add "Security Considerations" section to README.
350
- - Add pbkdf2 usePureJavaScript test.
351
- - Add rsa.generateKeyPair async and usePureJavaScript tests.
352
- - Add .editorconfig support.
353
- - Add `md.all.js` which includes all digest algorithms.
354
- - Add asn1 `equals()` and `copy()`.
355
- - Add asn1 `validate()` capture options for BIT STRING contents and value.
356
-
357
- ### Removed
358
-
359
- - **BREAKING**: Can no longer call `forge({...})` to create new instances.
360
- - Remove a large amount of old cruft.
361
-
362
- ### Migration from 0.6.x to 0.7.x
363
-
364
- - (all) If you used the feature to create a new forge instance with new
365
- configuration options you will need to rework your code. That ability has
366
- been removed due to implementation complexity. The main rare use was to set
367
- the option to use pure JavaScript. That is now available as a library global
368
- flag `forge.options.usePureJavaScript`.
369
- - (npm,bower) If you used the default main file there is little to nothing to
370
- change.
371
- - (npm) If you accessed a sub-resource like `forge/js/pki` you should either
372
- switch to just using the main `forge` and access `forge.pki` or update to
373
- `forge/lib/pki`.
374
- - (bower) If you used a sub-resource like `forge/js/pki` you should switch to
375
- just using `forge` and access `forge.pki`. The bower release bundles
376
- everything in one minified file.
377
- - (bower) A configured workerScript like
378
- `/bower_components/forge/js/prime.worker.js` will need to change to
379
- `/bower_components/forge/dist/prime.worker.min.js`.
380
- - (all) If you used the networking support or flash socket support, you will
381
- need to use a custom build and/or adjust where files are loaded from. This
382
- functionality is not included in the bower distribution by default and is
383
- also now in a different directory.
384
- - (all) The library should now directly support building custom bundles with
385
- webpack, browserify, or similar.
386
- - (all) If building a custom bundle ensure the correct dependencies are
387
- included. In particular, note there is now a `md.all.js` file to include all
388
- digest algorithms. Individual files limit what they include by default to
389
- allow smaller custom builds. For instance, `pbdkf2.js` has a `sha1` default
390
- but does not include any algorithm files by default. This allows the
391
- possibility to include only `sha256` without the overhead of `sha1` and
392
- `sha512`.
393
-
394
- ### Notes
395
-
396
- - This major update requires updating the version to 0.7.x. The existing
397
- work-in-progress "0.7.x" branch will be painfully rebased on top of this new
398
- 0.7.x and moved forward to 0.8.x or later as needed.
399
- - 0.7.x is a start of simplifying forge based on common issues and what has
400
- appeared to be the most common usage. Please file issues with feedback if the
401
- changes are problematic for your use cases.
402
-
403
- ## 0.6.x - 2016 and earlier
404
-
405
- - See Git commit log or https://github.com/digitalbazaar/forge.
@@ -1,28 +0,0 @@
1
- {
2
- "name": "node-forge-flash",
3
- "version": "0.0.0",
4
- "private": true,
5
- "description": "Flash build support for Forge.",
6
- "homepage": "https://github.com/digitalbazaar/forge",
7
- "author": {
8
- "name": "Digital Bazaar, Inc.",
9
- "email": "support@digitalbazaar.com",
10
- "url": "http://digitalbazaar.com/"
11
- },
12
- "devDependencies": {
13
- "flex-sdk": ""
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "https://github.com/digitalbazaar/forge"
18
- },
19
- "bugs": {
20
- "url": "https://github.com/digitalbazaar/forge/issues",
21
- "email": "support@digitalbazaar.com"
22
- },
23
- "license": "(BSD-3-Clause OR GPL-2.0)",
24
- "scripts": {
25
- "build": "mxmlc -debug=false -define=CONFIG::debugging,false -define=CONFIG::release,true -compiler.source-path=. -static-link-runtime-shared-libraries -output=swf/SocketPool.swf SocketPool.as",
26
- "build-debug": "mxmlc -debug=true -define=CONFIG::debugging,true -define=CONFIG::release,false -compiler.source-path=. -static-link-runtime-shared-libraries -output=swf/SocketPool.swf SocketPool.as"
27
- }
28
- }