node-forge 0.8.5 → 0.10.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/CHANGELOG.md CHANGED
@@ -1,6 +1,60 @@
1
1
  Forge ChangeLog
2
2
  ===============
3
3
 
4
+ ## 0.10.0 - 2019-09-01
5
+
6
+ ### Changed
7
+ - **BREAKING**: Node.js 4 no longer supported. The code *may* still work, and
8
+ non-invasive patches to keep it working will be considered. However, more
9
+ modern tools no longer support old Node.js versions making testing difficult.
10
+
11
+ ### Removed
12
+ - **BREAKING**: Remove `util.getPath`, `util.setPath`, and `util.deletePath`.
13
+ `util.setPath` had a potential prototype pollution security issue when used
14
+ with unsafe inputs. These functions are not used by `forge` itself. They date
15
+ from an early time when `forge` was targeted at providing general helper
16
+ functions. The library direction changed to be more focused on cryptography.
17
+ Many other excellent libraries are more suitable for general utilities. If
18
+ you need a replacement for these functions, consier `get`, `set`, and `unset`
19
+ from [lodash](https://lodash.com/). But also consider the potential similar
20
+ security issues with those APIs.
21
+
22
+ ## 0.9.2 - 2019-09-01
23
+
24
+ ### Changed
25
+ - Added `util.setPath` security note to function docs and to README.
26
+
27
+ ### Notes
28
+ - **SECURITY**: The `util.setPath` function has the potential to cause
29
+ prototype pollution if used with unsafe input.
30
+ - This function is **not** used internally by `forge`.
31
+ - The rest of the library is unaffected by this issue.
32
+ - **Do not** use unsafe input with this function.
33
+ - Usage with known input should function as expected. (Including input
34
+ intentionally using potentially problematic keys.)
35
+ - No code changes will be made to address this issue in 0.9.x. The current
36
+ behavior *could* be considered a feature rather than a security issue.
37
+ 0.10.0 will be released that removes `util.getPath` and `util.setPath`.
38
+ Consider `get` and `set` from [lodash](https://lodash.com/) if you need
39
+ replacements. But also consider the potential similar security issues with
40
+ those APIs.
41
+ - https://snyk.io/vuln/SNYK-JS-NODEFORGE-598677
42
+ - https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-7720
43
+
44
+ ## 0.9.1 - 2019-09-26
45
+
46
+ ### Fixed
47
+ - Ensure DES-CBC given IV is long enough for block size.
48
+
49
+ ## 0.9.0 - 2019-09-04
50
+
51
+ ### Added
52
+ - Add ed25519.publicKeyFromAsn1 and ed25519.privateKeyFromAsn1 APIs.
53
+ - A few OIDs used in EV certs.
54
+
55
+ ### Fixed
56
+ - Improve ed25519 NativeBuffer check.
57
+
4
58
  ## 0.8.5 - 2019-06-18
5
59
 
6
60
  ### Fixed
package/README.md CHANGED
@@ -1409,15 +1409,17 @@ var privateKeyInfo = pki.wrapRsaPrivateKey(rsaPrivateKey);
1409
1409
  // convert a PKCS#8 ASN.1 PrivateKeyInfo to PEM
1410
1410
  var pem = pki.privateKeyInfoToPem(privateKeyInfo);
1411
1411
 
1412
- // encrypts a PrivateKeyInfo and outputs an EncryptedPrivateKeyInfo
1412
+ // encrypts a PrivateKeyInfo using a custom password and
1413
+ // outputs an EncryptedPrivateKeyInfo
1413
1414
  var encryptedPrivateKeyInfo = pki.encryptPrivateKeyInfo(
1414
- privateKeyInfo, 'password', {
1415
+ privateKeyInfo, 'myCustomPasswordHere', {
1415
1416
  algorithm: 'aes256', // 'aes128', 'aes192', 'aes256', '3des'
1416
1417
  });
1417
1418
 
1418
- // decrypts an ASN.1 EncryptedPrivateKeyInfo
1419
+ // decrypts an ASN.1 EncryptedPrivateKeyInfo that was encrypted
1420
+ // with a custom password
1419
1421
  var privateKeyInfo = pki.decryptPrivateKeyInfo(
1420
- encryptedPrivateKeyInfo, 'password');
1422
+ encryptedPrivateKeyInfo, 'myCustomPasswordHere');
1421
1423
 
1422
1424
  // converts an EncryptedPrivateKeyInfo to PEM
1423
1425
  var pem = pki.encryptedPrivateKeyToPem(encryptedPrivateKeyInfo);