Commit Graph

2081 Commits

Author SHA1 Message Date
larabr
f6ee6e959e Finish merging key validation 2021-02-09 19:25:20 +01:00
Dan Ristea
b9afd26912 Fix comments on symmetric- and public-key encrypted session keys (#1120) 2021-02-09 19:25:20 +01:00
Daniel Huigens
6a607c7567 Rename SymEncryptedAEADProtectedDataPacket to AEADEncryptedDataPacket 2021-02-09 19:25:20 +01:00
Daniel Huigens
17fc32ba51 Appease linter 2021-02-09 19:25:20 +01:00
Daniel Huigens
aea7aa953a Use ES6 classes 2021-02-09 19:25:20 +01:00
Daniel Huigens
fb3d23427d Allow dead code elimination 2021-02-09 19:25:20 +01:00
Daniel Huigens
c20b75252b Add --build-only parameter to filter build outputs
Also, don't generate test bundle by default, but provide
`npm run build-test` instead.
2021-02-09 19:25:20 +01:00
Daniel Huigens
6a3d04ade6 Only produce source maps for minified dist builds 2021-02-09 19:25:20 +01:00
Daniel Huigens
6516602d7b Add shortcut to import 'openpgp/lightweight' 2021-02-09 19:25:20 +01:00
Daniel Huigens
8457639004 CI: for lightweight build, only run tests tagged 'lightweight' 2021-02-09 19:25:20 +01:00
Daniel Huigens
f3b16386dc Use dynamic import in lightweight build
Instead of dynamically loading a <script> tag.

This also removes the non-module lightweight build.
2021-02-09 19:25:20 +01:00
Daniel Huigens
7dbd393071 Remove src and test directory from npm package 2021-02-09 19:25:20 +01:00
Daniel Huigens
f936abec9d Bump Browserstack test to iOS 12 2021-02-09 19:25:20 +01:00
Daniel Huigens
4edd85be69 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".
2021-02-09 19:25:20 +01:00
Daniel Huigens
4f77990859 Polyfill globalThis 2021-02-09 19:25:20 +01:00
Daniel Huigens
89923dad17 Remove bower.json 2021-02-09 19:25:20 +01:00
Daniel Huigens
175eac5670 Remove compat polyfills 2021-02-09 19:25:20 +01:00
Daniel Huigens
ed9a029fcf Replace release.sh with npm version scripts 2021-02-09 19:25:20 +01:00
Daniel Huigens
defa1283cb Link to source code on GitHub from documentation
Instead of including the entire source code in the documentation.
2021-02-09 19:25:20 +01:00
Daniel Huigens
0c5598a0fc Replace remaining grunt tasks with npm scripts 2021-02-09 19:25:20 +01:00
Daniel Huigens
cde282d4f1 Replace 'global' with 'globalThis' 2021-02-09 19:25:20 +01:00
Daniel Huigens
5b148089c3 Switch to ES8 build of asmcrypto.js 2021-02-09 19:25:20 +01:00
Daniel Huigens
0e33e641af Switch build system to rollup
Also, default to minimized builds.
2021-02-09 19:25:20 +01:00
Daniel Huigens
c48070def6 Remove default export 2021-02-09 19:25:20 +01:00
Daniel Huigens
bdad8e3eec Remove dist folder from GitHub 2021-02-09 19:25:20 +01:00
Daniel Huigens
064e813f3f Build OpenPGP.js on local npm install 2021-02-09 19:25:20 +01:00
Ilya Chesnokov
6e648b1cbc Rename enums to use camelCase (#1093) 2021-02-09 19:25:20 +01:00
Daniel Huigens
ad33660da8 Fix lightweight build and browserstack test (#1092) 2021-02-09 19:25:20 +01:00
Ilya Chesnokov
e16807505f Switch util function names to camelCase (#1091) 2021-02-09 19:25:20 +01:00
Ilya Chesnokov
d415bc2546 Rename config option names to camelCase (#1088) 2021-02-09 19:25:20 +01:00
Daniel Huigens
63b6d215e3 Allow key.validate() to pass if it has a GNU dummy primary key
A valid signing subkey is required, in this case.
2021-02-09 19:25:20 +01:00
larabr
8823603396 Remove worker (#1072) 2021-02-09 19:25:20 +01:00
larabr
85d0358d45 Remove 3DES and CAST5 from default preferred symmetric algorithms (#1068) 2021-02-09 19:25:20 +01:00
larabr
20950e5df5 Remove SHA-1 from default preferred hash algorithms (#1067)
Also, remove SHA-1 from the (unused) KDF params constructor defaults.
2021-02-09 19:25:20 +01:00
larabr
5ad19c8da8 Generate ECC keys by default (#1065)
Also, remove the deprecated numBits options of generateKey in favor of rsaBits.
2021-02-09 19:25:20 +01:00
larabr
4c93abb9f9 Use V5 keys by default (#1063) 2021-02-09 19:25:20 +01:00
larabr
a7640bce52 Use AEAD protection by default (#1062) 2021-02-09 19:25:20 +01:00
Daniel Huigens
ec720cc096 Remove browsers that always fail from Browserstack tests 2021-02-09 19:25:20 +01:00
Daniel Huigens
2bc24f354b Return only one key in key.read[Armored], add readAll[Armored] 2021-02-09 19:25:20 +01:00
Daniel Huigens
3817cca3c6 Throw on unarmored messages with garbage data appended 2021-02-09 19:25:20 +01:00
Daniel Huigens
76a8f11780 Don't mutate key in openpgp.encryptKey/decryptKey 2021-02-09 19:25:20 +01:00
Daniel Huigens
9394fec1f4 Throw in openpgp.initWorker if worker failed to load 2021-02-09 19:25:20 +01:00
Daniel Huigens
29f29f6c6e Unit tests: Fix autoscroll with skipped tests 2021-02-09 19:25:20 +01:00
Daniel Huigens
35c13212dd Remove unnecessary calls to convertStreams() 2021-02-09 19:25:20 +01:00
Daniel Huigens
ef7c38860b 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.
2021-02-09 19:25:20 +01:00
Daniel Huigens
be7b174df4 Add openpgp.generateSessionKey 2021-02-09 19:25:20 +01:00
Daniel Huigens
a9a9a90ae2 Skip test for OpenPGP.js inside an application worker in old Edge
Old Edge doesn't support crypto.getRandomValues inside a Worker.
2021-02-09 19:25:20 +01:00
Daniel Huigens
3a84442b5f Don't use native streams in old Edge 2021-02-09 19:25:20 +01:00
Daniel Huigens
2fffc76060 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.
2021-02-09 19:25:20 +01:00
Daniel Huigens
430145a8b1 Update web-stream-tools
Fixes reading Node streams in some cases.
2021-02-09 19:25:20 +01:00