node-forge 0.6.47 → 0.7.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.
Files changed (67) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/LICENSE +3 -3
  3. package/README.md +254 -175
  4. package/dist/forge.all.min.js +11 -0
  5. package/dist/forge.all.min.js.map +1 -0
  6. package/dist/forge.min.js +10 -0
  7. package/dist/forge.min.js.map +1 -0
  8. package/dist/prime.worker.min.js +2 -0
  9. package/dist/prime.worker.min.js.map +1 -0
  10. package/flash/README.md +48 -0
  11. package/flash/package.json +28 -0
  12. package/flash/swf/SocketPool.swf +0 -0
  13. package/{js → lib}/aes.js +5 -61
  14. package/{js → lib}/aesCipherSuites.js +4 -58
  15. package/{js → lib}/asn1.js +371 -132
  16. package/{js → lib}/cipher.js +3 -59
  17. package/{js → lib}/cipherModes.js +3 -65
  18. package/{js → lib}/debug.js +2 -58
  19. package/{js → lib}/des.js +6 -63
  20. package/lib/forge.js +13 -0
  21. package/{js → lib}/form.js +5 -13
  22. package/{js → lib}/hmac.js +4 -58
  23. package/{js → lib}/http.js +15 -20
  24. package/lib/index.all.js +16 -0
  25. package/lib/index.js +34 -0
  26. package/{js → lib}/jsbn.js +3 -60
  27. package/{js → lib}/kem.js +5 -58
  28. package/{js → lib}/log.js +3 -58
  29. package/lib/md.all.js +13 -0
  30. package/lib/md.js +11 -0
  31. package/{js → lib}/md5.js +4 -60
  32. package/lib/mgf.js +12 -0
  33. package/lib/mgf1.js +57 -0
  34. package/lib/oids.js +159 -0
  35. package/{js → lib}/pbe.js +29 -79
  36. package/{js → lib}/pbkdf2.js +10 -64
  37. package/{js → lib}/pem.js +3 -58
  38. package/{js → lib}/pkcs1.js +6 -59
  39. package/{js → lib}/pkcs12.js +15 -74
  40. package/{js → lib}/pkcs7.js +12 -72
  41. package/{js → lib}/pkcs7asn1.js +4 -58
  42. package/{js → lib}/pki.js +12 -71
  43. package/{js → lib}/prime.js +18 -58
  44. package/{js → lib}/prime.worker.js +4 -1
  45. package/{js → lib}/prng.js +5 -62
  46. package/{js → lib}/pss.js +7 -61
  47. package/{js → lib}/random.js +11 -57
  48. package/{js → lib}/rc2.js +13 -73
  49. package/{js → lib}/rsa.js +13 -71
  50. package/{js → lib}/sha1.js +4 -60
  51. package/{js → lib}/sha256.js +4 -60
  52. package/{js → lib}/sha512.js +19 -61
  53. package/{js → lib}/socket.js +8 -63
  54. package/{js → lib}/ssh.js +7 -66
  55. package/{js → lib}/task.js +5 -58
  56. package/{js → lib}/tls.js +10 -67
  57. package/{js → lib}/tlssocket.js +6 -61
  58. package/{js → lib}/util.js +39 -68
  59. package/{js → lib}/x509.js +25 -102
  60. package/{js → lib}/xhr.js +12 -15
  61. package/package.json +58 -21
  62. package/js/forge.js +0 -94
  63. package/js/md.js +0 -75
  64. package/js/mgf.js +0 -67
  65. package/js/mgf1.js +0 -112
  66. package/js/oids.js +0 -288
  67. package/swf/SocketPool.swf +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,106 @@
1
+ Forge ChangeLog
2
+ ===============
3
+
4
+ ### Fixed
5
+
6
+ - Fix digestLength for hashes based on SHA-512.
7
+
8
+ ## 0.7.0 - 2017-02-07
9
+
10
+ ### Fixed
11
+
12
+ - Fix test looping bugs so all tests are run.
13
+ - Improved ASN.1 parsing. Many failure cases eliminated. More sanity checks.
14
+ Better behavior in default mode of parsing BIT STRINGs. Better handling of
15
+ parsed BIT STRINGs in `toDer()`. More tests.
16
+ - Improve X.509 BIT STRING handling by using new capture modes.
17
+
18
+ ### Changed
19
+
20
+ - Major refactor to use CommonJS plus a browser build system.
21
+ - Updated tests, examples, docs.
22
+ - Updated dependencies.
23
+ - Updated flash build system.
24
+ - Improve OID mapping code.
25
+ - Change test servers from Python to JavaScript.
26
+ - Improve PhantomJS support.
27
+ - Move Bower/bundle support to
28
+ [forge-dist](https://github.com/digitalbazaar/forge-dist).
29
+ - **BREAKING**: Require minimal digest algorithm dependencies from individual
30
+ modules.
31
+ - Enforce currently supported bit param values for byte buffer access. May be
32
+ **BREAKING** for code that depended on unspecified and/or incorrect behavior.
33
+ - Improve `asn1.prettyPrint()` BIT STRING display.
34
+
35
+ ### Added
36
+
37
+ - webpack bundler support via `npm run build`:
38
+ - Builds `.js`, `.min.js`, and basic sourcemaps.
39
+ - Basic build: `forge.js`.
40
+ - Build with extra utils and networking support: `forge.all.js`.
41
+ - Build WebWorker support: `prime.worker.js`.
42
+ - Browserify support in package.json.
43
+ - Karma browser testing.
44
+ - `forge.options` field.
45
+ - `forge.options.usePureJavaScript` flag.
46
+ - `forge.util.isNodejs` flag (used to select "native" APIs).
47
+ - Run PhantomJS tests in Travis-CI.
48
+ - Add "Donations" section to README.
49
+ - Add IRC to "Contact" section of README.
50
+ - Add "Security Considerations" section to README.
51
+ - Add pbkdf2 usePureJavaScript test.
52
+ - Add rsa.generateKeyPair async and usePureJavaScript tests.
53
+ - Add .editorconfig support.
54
+ - Add `md.all.js` which includes all digest algorithms.
55
+ - Add asn1 `equals()` and `copy()`.
56
+ - Add asn1 `validate()` capture options for BIT STRING contents and value.
57
+
58
+ ### Removed
59
+
60
+ - **BREAKING**: Can no longer call `forge({...})` to create new instances.
61
+ - Remove a large amount of old cruft.
62
+
63
+ ### Migration from 0.6.x to 0.7.x
64
+
65
+ - (all) If you used the feature to create a new forge instance with new
66
+ configuration options you will need to rework your code. That ability has
67
+ been removed due to implementation complexity. The main rare use was to set
68
+ the option to use pure JavaScript. That is now available as a library global
69
+ flag `forge.options.usePureJavaScript`.
70
+ - (npm,bower) If you used the default main file there is little to nothing to
71
+ change.
72
+ - (npm) If you accessed a sub-resource like `forge/js/pki` you should either
73
+ switch to just using the main `forge` and access `forge.pki` or update to
74
+ `forge/lib/pki`.
75
+ - (bower) If you used a sub-resource like `forge/js/pki` you should switch to
76
+ just using `forge` and access `forge.pki`. The bower release bundles
77
+ everything in one minified file.
78
+ - (bower) A configured workerScript like
79
+ `/bower_components/forge/js/prime.worker.js` will need to change to
80
+ `/bower_components/forge/dist/prime.worker.min.js`.
81
+ - (all) If you used the networking support or flash socket support, you will
82
+ need to use a custom build and/or adjust where files are loaded from. This
83
+ functionality is not included in the bower distribution by default and is
84
+ also now in a different directory.
85
+ - (all) The library should now directly support building custom bundles with
86
+ webpack, browserify, or similar.
87
+ - (all) If building a custom bundle ensure the correct dependencies are
88
+ included. In particular, note there is now a `md.all.js` file to include all
89
+ digest algorithms. Individual files limit what they include by default to
90
+ allow smaller custom builds. For instance, `pbdkf2.js` has a `sha1` default
91
+ but does not include any algorithm files by default. This allows the
92
+ possibility to include only `sha256` without the overhead of `sha1` and
93
+ `sha512`.
94
+
95
+ ### Notes
96
+
97
+ - This major update requires updating the version to 0.7.x. The existing
98
+ work-in-progress "0.7.x" branch will be painfully rebased on top of this new
99
+ 0.7.x and moved forward to 0.8.x or later as needed.
100
+ - 0.7.x is a start of simplifying forge based on common issues and what has
101
+ appeared to be the most common usage. Please file issues with feedback if the
102
+ changes are problematic for your use cases.
103
+
104
+ ## 0.6.x - 2016 and earlier
105
+
106
+ - See Git commit log or https://github.com/digitalbazaar/forge.
package/LICENSE CHANGED
@@ -1,11 +1,11 @@
1
- You may use the Forge project under the terms of either the BSD License or the
1
+ You may use the Forge project under the terms of either the BSD License or the
2
2
  GNU General Public License (GPL) Version 2.
3
3
 
4
- The BSD License is recommended for most projects. It is simple and easy to
4
+ The BSD License is recommended for most projects. It is simple and easy to
5
5
  understand and it places almost no restrictions on what you can do with the
6
6
  Forge project.
7
7
 
8
- If the GPL suits your project better you are also free to use Forge under
8
+ If the GPL suits your project better you are also free to use Forge under
9
9
  that license.
10
10
 
11
11
  You don't have to do anything special to choose one license or the other and