Commit Graph

68 Commits

Author SHA1 Message Date
Daniel Huigens
0db32bea39 Backpressure and cancellation in sign/verify 2018-08-10 14:46:28 +02:00
Daniel Huigens
55fd292fba Fix armor errors
Also, fix error handling in transformPair()
2018-08-10 14:46:25 +02:00
Daniel Huigens
304cbf4783 Fix backpressure 2018-08-10 14:46:25 +02:00
Daniel Huigens
ddda6a0b16 Implement cancellation by manually linking together input and output streams 2018-08-10 14:46:24 +02:00
Daniel Huigens
de2971d84a Use TransformStreams 2018-08-10 14:46:24 +02:00
Daniel Huigens
51c897b073 Cancelling 2018-08-10 14:46:23 +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
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
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
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
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
9853d3d830 Streaming encryption (Web) 2018-08-10 14:44:01 +02:00
Daniel Huigens
3fd0fa8f68 Various key revocation fixes 2018-07-13 17:45:09 +02:00
Daniel Huigens
b5c6e655de Warn about console usage 2018-05-03 13:07:52 +02:00
Sanjana Rajan
92542e3ee4 fix #636 2018-04-26 13:19:02 -07:00
Daniel Huigens
c63ed980a1 Fix dash-escaping the first line of cleartext signed messages 2018-04-25 19:46:43 +02:00
Mahrud Sayrafi
08da24de27
documentation fixes 2018-03-08 10:55:58 -08:00
BafS
b672f1936a Use let and const ES6 features.
Remove var, for let or const if possible, clean some syntax, enforce one var per declaration and semicolons
2018-02-13 23:33:09 +01:00
BafS
de6ffc2f76 Remove 'user strict'
'use strict' is unnecessary inside modules because module code is always strict mode code. Ref: https://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code
2018-02-13 23:33:09 +01:00
Mahrud Sayrafi
11a2d0070b ESLint is happy! 2018-01-30 18:31:30 +01:00
Tom James Holub
4495df0f42 improve armor header validation + tests | #598 2017-11-25 10:57:41 +08:00
Bart Butler
ad029f1929 Update armor.js
Only console.log if debug mode on
2017-08-19 10:52:36 -07:00
Bart Butler
1e8bd4315b Update armor.js
Small tweak
2017-08-19 10:49:36 -07:00
Patrick Brunschwig
93d823abb4 Fix for issue 573: don't throw with unknown Armor Headers, but just
with invalid ones
2017-08-19 18:32:02 +02:00
Tom James Holub
3f40a36081 do not remove equal sign at the end of armored body when missing checksum 2017-07-21 17:39:19 -07:00
Tom James Holub
ac055d69d2 fixed outdated annotations in armor.js 2017-07-21 15:39:06 -07:00
Tom James Holub
841b03d6cd improved armor behavior - trailing newline 2017-07-21 15:35:27 -07:00
Tom James Holub
c27725782c do not fail when missing armor checksum | #563 2017-07-21 10:13:33 -07:00
Sanjana Rajan
a7702a74d3 support split checksum where body and checksum are on the same line 2017-06-27 16:41:53 -07:00
Kévin Bernard-Allies
342bc8fe01 Simplify code of CRC24 checksum in armor encoding 2017-04-06 13:12:45 +02:00
Sanjana Rajan
7d02154dc9 small fixes 2017-03-07 13:59:18 -08:00
Sanjana Rajan
57d07091e8 add support for detached signatures 2017-03-07 13:59:17 -08:00
Tankred Hase
8728db2b08 Finish refactoring src/**/*.js to use import & export 2016-02-05 15:23:11 +07:00
Tankred Hase
8559cd2bff Refactor src/encoding/*.js and src/hkp/*.js to use import 2016-02-05 12:40:30 +07:00
Tankred Hase
90a7457b71 Refactor most src files to strict mode, delint 2016-02-04 00:37:00 +07:00
Bart Butler
b4916e29a3 binary strings to typed arrays in most places 2016-02-03 20:24:54 +07:00
Artem Chudinov
068d38d832 Use RegExp.prototype.test instead of String.prototype.match where it is OK
There is no sense in using String.prototype.match if the retrieved matched results
are not used.

By the way, if a bit of performance (especially RAM usage) is preferred over
unification, then, obviously, conditions like
if (/SIGNED MESSAGE/.test(header[1])) {
can be changed to
if (header[1].indexOf('SIGNED MESSAGE') !== -1) {
2016-01-07 15:35:47 +01:00
evilaliv3
9589fa0b52 Apply mixed code review thanks to webstorm inspector 2016-01-07 14:46:55 +01:00
Peter Breitling
07e4278a3a Optimized memory footprint for encrypting and decrypting 2015-06-10 21:12:55 +02:00
Andreas Fischer
b00ce34e90 Typo: Unknow -> Unknown 2014-11-17 12:31:04 +01:00
Tankred Hase
bbe174828f Upgrade license to LGPL version 3.0 or later. 2014-09-30 18:16:58 +02:00
Tankred Hase
de3ba18400 Implement content verification using detached signatures 2014-07-03 14:57:52 +02:00
Thomas Oberndörfer
172855a8e9 Redefine Regex for blank line after armor header. This fixes an issue with truncated blank lines at the beginning of cleartext signed messages. 2014-05-16 19:08:29 +02:00
Thomas Oberndörfer
ced145865e Accept armor header with trailing whitespace 2014-04-04 16:00:26 +02:00
Thomas Oberndörfer
e8ef355604 OP-01-010 Invalid Armor Checksum Validation (Low) 2014-03-29 16:25:28 +01:00
Thomas Oberndörfer
93ca8b62fe OP-01-019 Cleartext Message Spoofing in Armor Headers (Critical). Fix: throw error if unknown ASCII armor type. 2014-03-21 16:11:48 +01:00