Daniel Huigens
13c29b1fc9
Fix decryption with multiple passwords
2018-11-01 11:46:27 +01:00
Daniel Huigens
0a5461b8ba
Split Sauce Labs JS unit tests into multiple parts for slow browsers
...
Sauce Labs has a timeout of 5 minutes (including emulator/browser
startup time).
2018-09-10 19:27:13 +02:00
Daniel Huigens
d1626a7a51
Disable some tests on Sauce Labs
...
Since we still run the full test suite on Node.js, this would
only no longer catch bugs which are specific to
- Browser non-draft04 GCM (and don't manifest in draft04 GCM,
and don't manifest in Node.js non-draft04 GCM)
- Browser OCB (which is not natively implemented in the browser)
- Browser V5 Keys
2018-08-14 17:24:40 +02:00
Daniel Huigens
9bf7bbf45e
Don't generate a new key for each encryption mode in tests
2018-08-14 17:24:39 +02:00
Daniel Huigens
67b067b1da
Remove duplicate tests
...
Many tests would run for every encryption mode, or for both V4 and V5 keys,
without there being any difference between the different test runs.
`grunt coverage` before and after this commit reports almost identical
statistics, providing some confidence that no code coverage was lost.
2018-08-14 17:24:39 +02:00
Daniel Huigens
8c7e4386af
Fix stream-reading zero-length (partial) packets
2018-08-14 17:19:54 +02:00
Daniel Huigens
052fa444be
Support Node streams
2018-08-14 17:19:54 +02:00
Daniel Huigens
0ddff3ae7d
Rename asStream
to streaming
...
Also, break up `postProcess`.
2018-08-14 17:19:51 +02:00
Daniel Huigens
b35b167e63
Add openpgp.cleartext.fromText
...
For symmetry with message.fromText
2018-08-14 16:35:41 +02:00
Daniel Huigens
61a0e3fa69
Fix tests on IE11
2018-08-14 16:35:40 +02:00
Daniel Huigens
54d5bd7d39
Add testcase for verifying messages without one-pass-signatures
2018-08-14 16:35:39 +02:00
Daniel Huigens
1101a05b10
Don't return streams inside unarmored generated keys and signatures
...
When not requested, we convert the streams to Uint8Arrays.
This makes the generated key safe to pass to a Worker more than once.
Partially reverts 735aa1da.
2018-08-14 16:35:36 +02:00
Daniel Huigens
2b30ab9c8f
Replace data
with message
parameter in encrypt() and sign()
...
When encrypting/signing a stream, this allows you to indicate whether it's a
stream of Strings or Uint8Arrays (using message.fromText or message.fromBinary,
respectively.)
When signing text, this allows you to control whether to create a cleartext
message or a regular armored text message.
When creating a detached signature, it allows you to control whether it's "meant
for" (verifying against) a cleartext message. A cleartext message has trailing
whitespace trimmed before signing. This fixes the case of passing a detached
signature from sign() to encrypt(). Since encrypt() doesn't create a cleartext
message, the signature would be invalid if the text contained lines with
trailing whitespace.
2018-08-10 14:46:29 +02:00
Daniel Huigens
95413cc6ed
Fix signatures of messages with leading/trailing whitespace
2018-08-10 14:46:29 +02:00
Daniel Huigens
9f0f00e087
Make signature.verified a Promise instead of result.signatures
...
Also, fix verifying detached signatures
2018-08-10 14:46:28 +02:00
Daniel Huigens
d2ba6b3c6c
Wait for data to be read before resolving signatures
2018-08-10 14:46:28 +02:00
Daniel Huigens
4d82d25559
Pass more tests
...
We now use streams internally in more places.
2018-08-10 14:46:26 +02:00
Daniel Huigens
56ec5b3a8d
Don't keep extra copies of streams in memory
2018-08-10 14:46:22 +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
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
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
0372bf78f1
Make (de)armoring and packet reading asynchronous
2018-08-10 14:44:01 +02:00
Sanjana Rajan
8f01d4b0b5
clean up tests
2018-08-01 17:47:07 +03:00
Kay Lukas
6f176f8b30
Fix multiple workers
2018-07-26 18:33:30 +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
3fd0fa8f68
Various key revocation fixes
2018-07-13 17:45:09 +02:00
Daniel Huigens
1ed7943bf9
Create openpgp.revokeKey
2018-07-11 17:57:31 +02:00
Maximilian Krambach
1eb3902a96
Run tests with randomly generated strings
2018-05-17 12:40:30 +02:00
Daniel Huigens
6c2fec3450
Parse user IDs
...
Also, support comments when creating user IDs
2018-05-01 13:39:23 +02:00
Daniel Huigens
8ec01ae07a
Reduce duplicate tests
2018-04-30 16:58:38 +02:00
Daniel Huigens
550b758d57
Fall back to asm for CTR and CBC in old Safari
2018-04-30 16:58:35 +02:00
Daniel Huigens
7ce3f5521f
Set default draft version to 4
2018-04-30 15:55:38 +02:00
Daniel Huigens
04651e359a
Rename enums.aead.gcm to experimental_gcm
...
So that (1) if the spec ever defines GCM differently than we do, we have a
clean upgrade path and (2) it makes it clear that it's experimental.
2018-04-30 15:55:37 +02:00
Daniel Huigens
4568d080d5
Fix decryption with multiple chunks
2018-04-30 15:55:34 +02:00
Daniel Huigens
343c64eca0
Add tests for signing and verifying messages with trailing spaces
2018-04-30 15:55:33 +02:00
Daniel Huigens
e061df113c
Implement GCM mode in the new draft
...
Also, implement additional data for GCM
2018-04-30 15:55:31 +02:00
Daniel Huigens
6f2abdc2cf
Implement MIME message type (Literal Data Packet format 'm')
2018-04-27 14:06:19 +02:00
Daniel Huigens
e24b46192d
Only AEAD-protect when target keys support it
2018-04-27 14:06:18 +02:00
Daniel Huigens
e44fbbccab
Add more OCB tests
2018-04-27 14:06:18 +02:00
Daniel Huigens
28dbbadcff
Add config.aead_protect_version option
2018-04-27 14:06:17 +02:00
Daniel Huigens
7b3f51c0d4
Implement AEAD Encrypted Data Packet
2018-04-25 20:12:10 +02:00
Sanjana Rajan
e4bd27ce2f
tests
2018-04-16 10:51:07 -07:00
Sanjana Rajan
2f351985c4
tests
2018-03-19 18:55:30 -07:00
Mahrud Sayrafi
6fefe22c09
Finished fixing key.js; fixes async tests
2018-03-08 10:01:55 +01:00
Mahrud Sayrafi
0b2817ba39
Last little things become async ...
2018-03-08 10:01:55 +01:00
Bart Butler
2bb5db2cf4
multiple web workers
2018-03-05 21:36:53 -08:00
Bart Butler
572abadc91
random number web worker buffer automatic refill
2018-03-05 17:57:35 -08:00
Bart Butler
f57888fe55
change all calls of getRandomBytes and getRandomBN to be async
2018-03-05 16:31:56 -08:00
Bart Butler
0186ca8a24
tree shake sinon to just get what we need
2018-02-26 14:45:05 -08:00