diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-03-18 17:21:45 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2021-03-19 11:48:38 +0100 |
commit | 963f060e5e3f300770bec3f844d35cde9496402f (patch) | |
tree | fddf56affb8a015b25f24c4d3e4fbe922339dbdb /openpgp/src/serialize | |
parent | e0f82bfdccde09712ff704ee17d3f0f6e73af5fe (diff) |
openpgp: Simplify key serialization code.
Diffstat (limited to 'openpgp/src/serialize')
-rw-r--r-- | openpgp/src/serialize/cert.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openpgp/src/serialize/cert.rs b/openpgp/src/serialize/cert.rs index ab57457d..a3aa4cba 100644 --- a/openpgp/src/serialize/cert.rs +++ b/openpgp/src/serialize/cert.rs @@ -5,6 +5,7 @@ use crate::seal; use crate::serialize::{ PacketRef, Marshal, MarshalInto, + NetLength, generic_serialize_into, generic_export_into, }; @@ -546,7 +547,7 @@ impl<'a> MarshalInto for TSK<'a> { || tag == Tag::PublicSubkey) { // Emit a GnuPG-style secret key stub. The stub // extends the public key by 8 bytes. - let l = key.net_len_key(false) + 8; + let l = key.parts_as_public().net_len() + 8; return 1 // CTB + BodyLength::Full(l as u32).serialized_len() + l; |