summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-10-05 16:21:44 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-10-05 17:40:29 +0200
commitb292faa082b1a5b5e373975314ca980b9aa825ae (patch)
treec2a4a55a4b789ad9a88b1f92e344092b31141002
parent7afee60b7cf0f19559bfccd8c42fdc77f6b9c655 (diff)
openpgp: Pull more subpacket types into the module.
-rw-r--r--openpgp/src/packet/signature.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/openpgp/src/packet/signature.rs b/openpgp/src/packet/signature.rs
index a485b311..de13bd96 100644
--- a/openpgp/src/packet/signature.rs
+++ b/openpgp/src/packet/signature.rs
@@ -143,9 +143,11 @@ use crate::packet::UserAttribute;
use crate::Packet;
use crate::packet;
use crate::packet::signature::subpacket::{
+ Subpacket,
SubpacketArea,
SubpacketAreas,
SubpacketTag,
+ SubpacketValue,
};
#[cfg(test)]
@@ -1871,8 +1873,6 @@ impl crate::packet::Signature {
/// sorted, but are returned in the order that they are
/// encountered.
pub fn get_issuers(&self) -> Vec<crate::KeyHandle> {
- use crate::packet::signature::subpacket:: SubpacketValue;
-
let mut issuers: Vec<_> =
self.hashed_area().iter()
.chain(self.unhashed_area().iter())
@@ -2052,7 +2052,6 @@ impl crate::packet::Signature {
/// Adds missing issuer information from `additional_issuers` to
/// the unhashed subpacket area.
fn add_missing_issuers(&mut self) -> Result<()> {
- use subpacket::{Subpacket, SubpacketValue};
let issuers = self.get_issuers();
for id in std::mem::replace(&mut self.additional_issuers,
Vec::with_capacity(0)) {
@@ -2117,7 +2116,6 @@ impl crate::packet::Signature {
/// Vec::dedup_by.
pub(crate) fn merge_internal(&mut self, other: &Signature) -> Result<()>
{
- use subpacket::{Subpacket, SubpacketValue};
use crate::serialize::MarshalInto;
if ! self.normalized_eq(other) {
@@ -2311,7 +2309,6 @@ impl Signature {
// The self-authenticating unhashed subpackets are
// authenticated by the key's identity.
self.unhashed_area_mut().iter_mut().for_each(|p| {
- use subpacket::SubpacketValue;
let authenticated = match p.value() {
SubpacketValue::Issuer(id) =>
id == &key.keyid(),