diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-12-13 12:13:47 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-12-13 13:21:58 +0100 |
commit | 56ee713f3510f81a04ff36132c8aaf7555396b2b (patch) | |
tree | 233291afcff9023e7fa1a73984a59914cc5fcc03 /openpgp/src/message | |
parent | dfa222df2014cb59dff37e69866f02ad510e2882 (diff) |
openpgp: Make fields of PKESK private.
Diffstat (limited to 'openpgp/src/message')
-rw-r--r-- | openpgp/src/message/mod.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/openpgp/src/message/mod.rs b/openpgp/src/message/mod.rs index cee9d4c1..c90cc4ca 100644 --- a/openpgp/src/message/mod.rs +++ b/openpgp/src/message/mod.rs @@ -1053,13 +1053,10 @@ mod tests { #[allow(deprecated)] packets.insert( 1, - Packet::PKESK(PKESK { - common: Default::default(), - version: 0, - recipient: KeyID::from_hex("0000111122223333").unwrap(), - pk_algo: PublicKeyAlgorithm::RSAEncrypt, - esk: Ciphertext::RSA { c: MPI::new(&[]) }, - })); + Packet::PKESK(PKESK::new_( + KeyID::from_hex("0000111122223333").unwrap(), + PublicKeyAlgorithm::RSAEncrypt, + Ciphertext::RSA { c: MPI::new(&[]) }).unwrap())); assert!(packets.iter().map(|p| p.tag()).collect::<Vec<Tag>>() == [ Tag::SKESK, Tag::PKESK, Tag::SKESK, Tag::SEIP ]); |