diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-06-05 12:09:27 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-06-05 12:52:09 +0200 |
commit | 4c7f664493ba35181eca0a6ff8630a4ddf2e01b2 (patch) | |
tree | 2ae2db3be2af94de6fd4ce69d44133cfe92aa612 /openpgp/tests | |
parent | 2e0cb0de66e73ff6681276e90f31690a991bffc5 (diff) |
openpgp: Fix parsing.
- Previously, a signature packet with a malformed embedded signature
would break the parsing, because the embedded signature is turned
into an unknown packet, hence `Signature::from_reader` returns
`Error::InvalidOperation` and so does `SubpacketArea::parse`.
Errors from that function are handled using php_try!, but that did
not make the packet turn into an unknown packet, but terminated
the parsing.
- Looking at `Subpacket::parse` revealed that there are more errors
that would terminate parsing in the outlined way, notably
`Error::MalformedPacket`, but there may be others.
- Fix this by tweaking php_try! to return unknown packets on any
`openpgp::Error`.
Diffstat (limited to 'openpgp/tests')
-rw-r--r-- | openpgp/tests/data/edge-cases/malformed-embedded-sig.pgp | bin | 0 -> 642 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/openpgp/tests/data/edge-cases/malformed-embedded-sig.pgp b/openpgp/tests/data/edge-cases/malformed-embedded-sig.pgp Binary files differnew file mode 100644 index 00000000..5b2f1597 --- /dev/null +++ b/openpgp/tests/data/edge-cases/malformed-embedded-sig.pgp |