summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2024-04-11 14:10:01 +0200
committerJustus Winter <justus@sequoia-pgp.org>2024-04-11 14:10:01 +0200
commit16f1e74ef4d161014ffd28869c65a002efcd43ee (patch)
tree6e600f07dcdf5a499ba4de013240c6de6386d7ea
parentc457d1405ab3fe41bb52221aabb87b6b27937e7c (diff)
openpgp: Align definition of self-signature.
- Fixes f9e15b3974b71aed87871999014b901a5aee03a8 by also applying the change to the low-level cert parser. - Fixes #1084.
-rw-r--r--openpgp/src/cert/parser/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp/src/cert/parser/mod.rs b/openpgp/src/cert/parser/mod.rs
index eec5a5d0..4ac58ca1 100644
--- a/openpgp/src/cert/parser/mod.rs
+++ b/openpgp/src/cert/parser/mod.rs
@@ -934,7 +934,9 @@ pub(crate) fn split_sigs<C>(primary: &KeyHandle,
let typ = sig.typ();
let issuers = sig.get_issuers();
- let is_selfsig = issuers.iter().any(|kh| kh.aliases(primary));
+ let is_selfsig =
+ issuers.is_empty()
+ || issuers.iter().any(|kh| kh.aliases(primary));
use crate::SignatureType::*;
if typ == KeyRevocation