diff options
Diffstat (limited to 'openpgp/src/autocrypt.rs')
-rw-r--r-- | openpgp/src/autocrypt.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openpgp/src/autocrypt.rs b/openpgp/src/autocrypt.rs index 9a6348df..06cdb5b4 100644 --- a/openpgp/src/autocrypt.rs +++ b/openpgp/src/autocrypt.rs @@ -106,8 +106,9 @@ impl AutocryptHeader { let mut acc = Vec::new(); // The primary key and the most recent selfsig. - acc.push(cert.primary().clone().into()); - cert.direct_signatures().iter().take(1) + let primary = cert.keys().primary_key(); + acc.push(primary.key().clone().into()); + primary.self_signatures().iter().take(1) .for_each(|s| acc.push(s.clone().into())); // The subkeys and the most recent selfsig. |