diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-09-10 16:24:27 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-09-10 16:31:21 +0200 |
commit | 34d92b7441aa88ab4255b90eab19d3734025ee9f (patch) | |
tree | 21c68690cac8ac995241bef5cd8c8ea0a3f10a17 /openpgp/src/parse | |
parent | 1ce4cc737838f7c4c1848a0ea6933ee750bd69d6 (diff) |
openpgp: Make CTBCommon's tag field private.
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r-- | openpgp/src/parse/parse.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs index 443935bc..07d6ca08 100644 --- a/openpgp/src/parse/parse.rs +++ b/openpgp/src/parse/parse.rs @@ -819,7 +819,7 @@ impl Unknown { fn parse<'a>(php: PacketHeaderParser<'a>, error: failure::Error) -> Result<PacketParser<'a>> { - let tag = php.header.ctb().tag; + let tag = php.header.ctb().tag(); php.ok(Packet::Unknown(Unknown::new(tag, error))) .map(|pp| pp.set_decrypted(false)) } @@ -1322,7 +1322,7 @@ impl Key<key::UnspecifiedParts, key::UnspecifiedRole> /// secret subkey packet. fn parse<'a>(mut php: PacketHeaderParser<'a>) -> Result<PacketParser<'a>> { make_php_try!(php); - let tag = php.header.ctb().tag; + let tag = php.header.ctb().tag(); assert!(tag == Tag::Reserved || tag == Tag::PublicKey || tag == Tag::PublicSubkey @@ -1355,7 +1355,7 @@ impl Key4<key::UnspecifiedParts, key::UnspecifiedRole> use crate::serialize::Serialize; make_php_try!(php); - let tag = php.header.ctb().tag; + let tag = php.header.ctb().tag(); assert!(tag == Tag::Reserved || tag == Tag::PublicKey || tag == Tag::PublicSubkey @@ -1436,7 +1436,7 @@ impl Key4<key::UnspecifiedParts, key::UnspecifiedRole> pk_algo, mpis, secret) } - let tag = php.header.ctb().tag; + let tag = php.header.ctb().tag(); let p : Packet = match tag { // For the benefit of Key::from_bytes. @@ -2642,7 +2642,7 @@ impl <'a> PacketParser<'a> { let bad = Err( Error::MalformedPacket("Can't make an educated case".into()).into()); - match header.ctb().tag { + match header.ctb().tag() { Tag::Reserved | Tag::Marker | Tag::Unknown(_) | Tag::Private(_) => Err(Error::MalformedPacket("Looks like garbage".into()).into()), @@ -2767,7 +2767,7 @@ impl <'a> PacketParser<'a> { 0 }; - let tag = header.ctb().tag; + let tag = header.ctb().tag(); // A buffered_reader::Dup always has an inner. let mut bio = Box::new(bio).into_inner().unwrap(); |