Commit Graph

2016 Commits

Author SHA1 Message Date
Daniel Huigens
0e96e863cf CI: for lightweight build, only run tests tagged 'lightweight' 2020-09-14 15:35:26 +02:00
Daniel Huigens
38af2d18cb Use dynamic import in lightweight build
Instead of dynamically loading a <script> tag.

This also removes the non-module lightweight build.
2020-09-14 15:35:26 +02:00
Daniel Huigens
bf181b2b75 Remove src and test directory from npm package 2020-09-14 15:35:26 +02:00
Daniel Huigens
6f147f4695 Bump Browserstack test to iOS 12 2020-09-14 15:35:26 +02:00
Daniel Huigens
9087dd0d5f Drop Node.js 8 support and Travis test
It should still work, but we can no longer test it
because rollup requires Node.js 10+.

Also, remove "allowed failures".
2020-09-14 15:35:26 +02:00
Daniel Huigens
705e708f1e Polyfill globalThis 2020-09-14 15:35:26 +02:00
Daniel Huigens
a9d64f2c5f Remove bower.json 2020-09-14 15:35:26 +02:00
Daniel Huigens
815dba04d8 Remove compat polyfills 2020-09-14 15:35:26 +02:00
Daniel Huigens
e96e7097f5 Replace release.sh with npm version scripts 2020-09-14 15:35:26 +02:00
Daniel Huigens
42826d2d8b Link to source code on GitHub from documentation
Instead of including the entire source code in the documentation.
2020-09-14 15:35:26 +02:00
Daniel Huigens
4be4052f91 Replace remaining grunt tasks with npm scripts 2020-09-14 15:35:26 +02:00
Daniel Huigens
50579d0b9e Replace 'global' with 'globalThis' 2020-09-14 15:35:26 +02:00
Daniel Huigens
6a942456fe Switch to ES8 build of asmcrypto.js 2020-09-14 15:35:26 +02:00
Daniel Huigens
9cf2d56595 Switch build system to rollup
Also, default to minimized builds.
2020-09-14 15:35:26 +02:00
Daniel Huigens
b9ca597db4 Remove default export 2020-09-14 15:35:26 +02:00
Daniel Huigens
d56c4698f8 Remove dist folder from GitHub 2020-09-14 15:35:26 +02:00
Daniel Huigens
a20ccae331 Build OpenPGP.js on local npm install 2020-09-14 15:35:26 +02:00
Ilya Chesnokov
483798701f Rename enums to use camelCase (#1093) 2020-09-14 15:35:26 +02:00
Daniel Huigens
62bd67c1b1 Fix lightweight build and browserstack test (#1092) 2020-09-14 15:35:26 +02:00
Ilya Chesnokov
a15c5c81f1 Switch util function names to camelCase (#1091) 2020-09-14 15:35:26 +02:00
Ilya Chesnokov
a75ecf1169 Rename config option names to camelCase (#1088) 2020-09-14 15:35:23 +02:00
Daniel Huigens
962486c7c3 Allow key.validate() to pass if it has a GNU dummy primary key
A valid signing subkey is required, in this case.
2020-09-14 15:34:57 +02:00
larabr
c869cb668c Remove worker (#1072) 2020-09-14 15:34:57 +02:00
larabr
8f89ec9c0c Remove 3DES and CAST5 from default preferred symmetric algorithms (#1068) 2020-09-14 15:34:57 +02:00
larabr
ca9129322d Remove SHA-1 from default preferred hash algorithms (#1067)
Also, remove SHA-1 from the (unused) KDF params constructor defaults.
2020-09-14 15:34:57 +02:00
larabr
54ea245c81 Generate ECC keys by default (#1065)
Also, remove the deprecated numBits options of generateKey in favor of rsaBits.
2020-09-14 15:34:57 +02:00
larabr
75dd25661a Use V5 keys by default (#1063) 2020-09-14 15:34:57 +02:00
larabr
f8f8d3e387 Use AEAD protection by default (#1062) 2020-09-14 15:34:57 +02:00
Daniel Huigens
db1c0e4afe Remove browsers that always fail from Browserstack tests 2020-09-14 15:34:57 +02:00
Daniel Huigens
e9ffee50b2 Return only one key in key.read[Armored], add readAll[Armored] 2020-09-14 15:34:48 +02:00
Daniel Huigens
fe90df2b5e Throw on unarmored messages with garbage data appended 2020-09-14 15:22:57 +02:00
Daniel Huigens
5af597fe03 Don't mutate key in openpgp.encryptKey/decryptKey 2020-09-14 15:22:57 +02:00
Daniel Huigens
86c85a4341 Throw in openpgp.initWorker if worker failed to load 2020-09-14 15:22:57 +02:00
Daniel Huigens
c4d5f2325b Unit tests: Fix autoscroll with skipped tests 2020-09-14 15:22:57 +02:00
Daniel Huigens
6752d7958b Remove unnecessary calls to convertStreams() 2020-09-14 15:22:57 +02:00
Daniel Huigens
bd856de0c8 Don't unnecessarily return objects in top-level functions
openpgp.encrypt, sign, encryptSessionKey, encryptKey and decryptKey now
return their result directly without wrapping it in a "result" object.

Also, remove the `detached` and `returnSessionKey` options of
openpgp.encrypt.
2020-09-14 15:22:57 +02:00
Daniel Huigens
c56d2063b4 Add openpgp.generateSessionKey 2020-09-14 15:22:57 +02:00
Daniel Huigens
bc91ac302d Skip test for OpenPGP.js inside an application worker in old Edge
Old Edge doesn't support crypto.getRandomValues inside a Worker.
2020-09-14 15:22:57 +02:00
Daniel Huigens
741961f809 Don't use native streams in old Edge 2020-09-14 15:22:57 +02:00
Daniel Huigens
020b337a3a Don't overwrite Web Streams Polyfill to globals
Instead, use the ponyfill that's now included in web-stream-tools.
Also, convert back to native ReadableStream when we used the ponyfill.
2020-09-14 15:22:57 +02:00
Daniel Huigens
d7ec6e233d Update web-stream-tools
Fixes reading Node streams in some cases.
2020-09-14 15:22:56 +02:00
Daniel Huigens
479cd2e4e5 Return strings in Node streams where appropriate 2020-09-14 15:22:56 +02:00
Daniel Huigens
3f737965db Return data instead of message in encryptSessionKey
Add `armor=true/false` parameter to decide whether `data` is an armored
String or an unarmored Uint8Array.
2020-09-14 15:22:56 +02:00
Daniel Huigens
75c41eacfd Return data as string in openpgp.verify by default
Add format='utf8'/'binary' param to openpgp.verify in order to be able
to return binary data instead.
2020-09-14 15:22:56 +02:00
Daniel Huigens
d2ac8933e2 Return Uint8Array(Stream) instead of object when armor = false 2020-09-14 15:22:56 +02:00
Chen Longhao
929b016948 Fix documentation of the HKP keyId option (#1151) 2020-09-09 12:26:03 +02:00
Daniel Huigens
aa89893773 Release new version v4.10.8 2020-08-28 16:42:25 +02:00
larabr
2eab8a1ebc Add config option to allow insecure decryption with RSA signing keys (#1148) 2020-08-28 16:09:56 +02:00
larabr
cc1bdcbae8 Allow decryption with revoked keys (#1135)
However, when decrypting session keys, check that the public key
algorithm matches that of the decryption key.
2020-08-18 15:49:27 +02:00
Wiktor Kwapisiewicz
2e26509723 Add test case for unknown binary notations (#1140) 2020-08-18 13:37:36 +02:00