summaryrefslogtreecommitdiffstats
path: root/openpgp/tests
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2018-09-27 10:10:11 +0200
committerNeal H. Walfield <neal@pep.foundation>2018-10-01 12:28:41 +0200
commit8087f38e2dca127b54bbf7b58533c712faa0cbfd (patch)
treeace362e542b876fa1bfde16df1d192108582b11e /openpgp/tests
parentc0f3de2e7fecc12717313900fdf4348e40ffb1f4 (diff)
openpgp: Stop compressed data packets from swallowing MDC packets
- When parsing a compression packet using an old-style indeterminate length encoding, the parser is supposed to read until it encounters a "natural" EOF (i.e., the end of the compressed data), but the decompressor blindly buffers data, so it usually swallows the MDC packet. - Since we know the size of the MDC packet apriori, we can use a BufferedReaderReserve to prevent it from being consumed by the decompressor.
Diffstat (limited to 'openpgp/tests')
-rw-r--r--openpgp/tests/data/messages/seip/foo-priv.pgpbin0 -> 2507 bytes
-rw-r--r--openpgp/tests/data/messages/seip/foo.pgpbin0 -> 1205 bytes
-rw-r--r--openpgp/tests/data/messages/seip/msg-compression-not-signed-password-123.pgp1
-rw-r--r--openpgp/tests/data/messages/seip/msg-compression-signed-password-123.pgpbin0 -> 417 bytes
-rw-r--r--openpgp/tests/data/messages/seip/msg-no-compression-not-signed-password-123.pgp1
-rw-r--r--openpgp/tests/data/messages/seip/msg-no-compression-signed-password-123.pgpbin0 -> 415 bytes
6 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/tests/data/messages/seip/foo-priv.pgp b/openpgp/tests/data/messages/seip/foo-priv.pgp
new file mode 100644
index 00000000..ff182ff7
--- /dev/null
+++ b/openpgp/tests/data/messages/seip/foo-priv.pgp
Binary files differ
diff --git a/openpgp/tests/data/messages/seip/foo.pgp b/openpgp/tests/data/messages/seip/foo.pgp
new file mode 100644
index 00000000..aa4efc8b
--- /dev/null
+++ b/openpgp/tests/data/messages/seip/foo.pgp
Binary files differ
diff --git a/openpgp/tests/data/messages/seip/msg-compression-not-signed-password-123.pgp b/openpgp/tests/data/messages/seip/msg-compression-not-signed-password-123.pgp
new file mode 100644
index 00000000..56ff74da
--- /dev/null
+++ b/openpgp/tests/data/messages/seip/msg-compression-not-signed-password-123.pgp
@@ -0,0 +1 @@
+ oM>xHQRJ<r'rF H眪;Ls3G3DM- 4+h3d9j?<| coV&S@D \ No newline at end of file
diff --git a/openpgp/tests/data/messages/seip/msg-compression-signed-password-123.pgp b/openpgp/tests/data/messages/seip/msg-compression-signed-password-123.pgp
new file mode 100644
index 00000000..ce38d226
--- /dev/null
+++ b/openpgp/tests/data/messages/seip/msg-compression-signed-password-123.pgp
Binary files differ
diff --git a/openpgp/tests/data/messages/seip/msg-no-compression-not-signed-password-123.pgp b/openpgp/tests/data/messages/seip/msg-no-compression-not-signed-password-123.pgp
new file mode 100644
index 00000000..26ee7c87
--- /dev/null
+++ b/openpgp/tests/data/messages/seip/msg-no-compression-not-signed-password-123.pgp
@@ -0,0 +1 @@
+ 4MnU/L9px%>$տ踆޴7hwPkYo-MZqL$=*^ěbW \ No newline at end of file
diff --git a/openpgp/tests/data/messages/seip/msg-no-compression-signed-password-123.pgp b/openpgp/tests/data/messages/seip/msg-no-compression-signed-password-123.pgp
new file mode 100644
index 00000000..9b384a04
--- /dev/null
+++ b/openpgp/tests/data/messages/seip/msg-no-compression-signed-password-123.pgp
Binary files differ