Commit Graph

1521 Commits

Author SHA1 Message Date
Daniel Huigens
4bbbdaee9f Rename stream.subarray() to stream.slice()
Also, support ReadableStream[String] in stream.* and reader.* functions
2018-08-10 14:46:22 +02:00
Daniel Huigens
56ec5b3a8d Don't keep extra copies of streams in memory 2018-08-10 14:46:22 +02:00
Daniel Huigens
78a0ca937e Cache browserified modules
Adding asmcrypto's SHA1 and SHA512 made browserify a lot slower,
this makes it a lot faster on the second run at least.
2018-08-10 14:46:21 +02:00
Daniel Huigens
f79a3f718d Fix streaming UTF8 decoding 2018-08-10 14:44:01 +02:00
Daniel Huigens
f0633f00ea Don't repeatedly decrypt the same key in unit tests 2018-08-10 14:44:01 +02:00
Daniel Huigens
253e1c572b Switch to asmcrypto for hashing where available 2018-08-10 14:44:01 +02:00
Daniel Huigens
ade2627bca Streaming verify one-pass signatures 2018-08-10 14:44:01 +02:00
Daniel Huigens
ead3ddd706 Streaming decrypt old-format packets 2018-08-10 14:44:01 +02:00
Daniel Huigens
9fcc075f0b Streaming decrypt non-partial-length-encoded packets 2018-08-10 14:44:01 +02:00
Daniel Huigens
fb155ffae0 Streaming support on Node 2018-08-10 14:44:01 +02:00
Daniel Huigens
8658816b90 Add Web Streams polyfill 2018-08-10 14:44:01 +02:00
Daniel Huigens
802e1b8d94 Transfer Streams to Workers
Also, add a "asStream" parameter to high-level functions to control
whether the return value is a Stream; defaulting to whether the
parameter passed was a Stream.
2018-08-10 14:44:01 +02:00
Daniel Huigens
58eca571bf Fix integrity_protect = false 2018-08-10 14:44:01 +02:00
Daniel Huigens
d67526338e Streaming (de)compression (Web)
compressjs has a streaming API, but it is synchronous, so we can't use it
(at least in the browser).
2018-08-10 14:44:01 +02:00
Daniel Huigens
37014ecf30 Pass more tests
- Allow leading spaces in headers (since we were already accepting
leading spaces everywhere else in the armored text).
- Read ReadableStreams before passing them to a Worker
2018-08-10 14:44:01 +02:00
Daniel Huigens
05479e6e6b Don't warn about await in loops 2018-08-10 14:44:01 +02:00
Daniel Huigens
db39e616ca Replace stream.tee() with stream.clone()
Also some other fixes to pass more tests.
2018-08-10 14:44:01 +02:00
Daniel Huigens
3475843d82 Don't hack util.concatUint8Array() to handle Streams
Use util.concat() instead.
2018-08-10 14:44:01 +02:00
Daniel Huigens
16ba26c298 Streaming AEAD 2018-08-10 14:44:01 +02:00
Daniel Huigens
1f30556674 Split stream.transform into using two helper functions 2018-08-10 14:44:01 +02:00
Daniel Huigens
4ada3fa590 Don't mutate prototypes of Uint8Array, ReadableStream and ReadableStreamDefaultWriter 2018-08-10 14:44:01 +02:00
Daniel Huigens
70f0e1d2f5 Finish streaming armoring 2018-08-10 14:44:01 +02:00
Daniel Huigens
0af4742a14 Signatures 2018-08-10 14:44:01 +02:00
Daniel Huigens
0372bf78f1 Make (de)armoring and packet reading asynchronous 2018-08-10 14:44:01 +02:00
Daniel Huigens
403bdc5346 Streaming decryption (Web) 2018-08-10 14:44:01 +02:00
Daniel Huigens
b4f5976242 Writing partial lengths 2018-08-10 14:44:01 +02:00
Daniel Huigens
9853d3d830 Streaming encryption (Web) 2018-08-10 14:44:01 +02:00
Daniel Huigens
9302fdcc56 Don't cache literal.getBytes() when signing with textMode=false
This partially reverts bcfb9c0.
2018-08-10 14:44:01 +02:00
Sanjana Rajan
5be838f9bb Release new version 2018-08-03 14:55:04 +02:00
Sanjana Rajan
c79bda1d37 bugfix - compare create time from key packet 2018-08-03 14:21:15 +02:00
Sanjana Rajan
16762d02f0 Release new version 2018-08-01 17:50:23 +03:00
Sanjana Rajan
8f01d4b0b5 clean up tests 2018-08-01 17:47:07 +03:00
Sanjana Rajan
adb0148ca1 fix #748, signature cloning in verification objects 2018-07-30 15:32:17 +03:00
Sanjana Rajan
d1416cbe2c
Merge pull request #746 from KAYLukas/fix/worker
Fix multiple workers
2018-07-27 10:41:35 +02:00
Sanjana Rajan
01abfc507d remove unnecessary trims 2018-07-27 09:50:54 +02:00
Kay Lukas
6f176f8b30 Fix multiple workers 2018-07-26 18:33:30 +02:00
Sanjana Rajan
438d47f634 handle case where primary user doesn't exist when getting exp time 2018-07-24 17:17:12 +02:00
Sanjana Rajan
49153db63b
Merge pull request #742 from wiktor-k/fix-uat-verification
Fix verification of User Attributes
2018-07-24 14:18:14 +02:00
Wiktor Kwapisiewicz
19e3c344fd
Fix verification of User Attributes
This change corrects verification of certifications over User Attributes
(such as photos).

Before this change the code did not differentiate between User IDs and
User Attributes as both of them were stored in `data.userid` [0] and
incorrectly used the User ID constant (0xB4) for both cases.

This change fixes the bug by storing User IDs in `userId` property and
User Attributes in `userAttribute` property. The check for property
existence has been modified to avoid comparisons with `undefined` as the
`User` class sets `null` for not assigned packets instead of
`undefined`.

Only data structures for signing and verification were modified and not
the properties used in the `User` class.

[0]: 11b2d2de3c/src/key.js (L872)
2018-07-24 13:03:46 +02:00
Sanjana Rajan
5c574d92ca remove package-lock 2018-07-23 15:12:01 +02:00
Sanjana Rajan
21449ebd50 Release new version 2018-07-19 18:13:51 +02:00
Sanjana Rajan
11b2d2de3c
Merge pull request #739 from twiss/key-expiry-capabilities
Allow checking expiry of key by capabilities
2018-07-19 15:23:25 +02:00
Daniel Huigens
15e6f0d654 Replace get(Sub)KeyPackets with get(Sub)Keys 2018-07-19 15:03:25 +02:00
Daniel Huigens
91b7165b78 Add key/subKey.getKeyId, getFingerprint, getAlgorithmInfo, getCreationTime, isDecrypted 2018-07-19 15:03:25 +02:00
Daniel Huigens
8cfe817b18 Remove getEncryptionKeyPacket and getSigningKeyPacket
Also, rename subKey.subKey to keyPacket and alias key.primaryKey as keyPacket.
2018-07-19 13:31:03 +02:00
Daniel Huigens
a49276a158 Allow checking expiry of subkeys by capability, keyId or userId 2018-07-18 14:40:28 +02:00
Daniel Huigens
06746b6a77 Use latest created subkey when possible 2018-07-18 14:29:59 +02:00
Daniel Huigens
8f3e448fa6 Remove obsolete JSDoc comment 2018-07-13 18:15:53 +02:00
Sanjana Rajan
21c908a86a Release new version 2018-07-13 18:00:28 +02:00
Sanjana Rajan
53f473bfa7
Merge pull request #734 from twiss/key-revocation
Key revocation
2018-07-13 17:46:48 +02:00