summaryrefslogtreecommitdiffstats
path: root/openpgp/src/lib.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2022-06-07 16:52:17 +0200
committerJustus Winter <justus@sequoia-pgp.org>2022-06-08 11:09:39 +0200
commit4a2bb0042e4d89252fcde0e1094c40bf249765c5 (patch)
treed594fe06357618329c41efef6e0a84167d1a27b7 /openpgp/src/lib.rs
parentb27e9e1d2ccc145dffb080d9e621699fd6111737 (diff)
openpgp: New error condition, UnsupportedCert2.
- In contrast to UnsupportedCert, this variant carries all the packets that we failed to parse into a cert. Notably, this includes primary keys that we don't understand. Keeping the packets with the errors allows us to at least roundtrip the packets.
Diffstat (limited to 'openpgp/src/lib.rs')
-rw-r--r--openpgp/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs
index 11878174..4ea09661 100644
--- a/openpgp/src/lib.rs
+++ b/openpgp/src/lib.rs
@@ -296,6 +296,11 @@ pub enum Error {
/// unsupported format. In particular, Sequoia does not support
/// version 3 keys.
#[error("Unsupported Cert: {0}")]
+ UnsupportedCert2(String, Vec<Packet>),
+
+ /// Unsupported Cert, deprecated version.
+ #[deprecated(since = "1.10.0", note = "Use UnsupportedCert2 instead.")]
+ #[error("Unsupported Cert: {0}")]
UnsupportedCert(String),
/// Index out of range.