diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2021-04-21 12:49:13 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2021-04-26 13:14:15 +0200 |
commit | 710f2c60a9a00a5a4c3199f25d387fe82aa21aa0 (patch) | |
tree | 3a6694d7890161b9e85d2fdba04e3309249e485f /sq | |
parent | 522e5811c2aa0dc741807cc42d5a3eac2bf63413 (diff) |
openpgp: Expose low-level functions for attestation key signatures.
- See #335.
Diffstat (limited to 'sq')
-rw-r--r-- | sq/src/commands/key.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sq/src/commands/key.rs b/sq/src/commands/key.rs index 6073e886..41077cd6 100644 --- a/sq/src/commands/key.rs +++ b/sq/src/commands/key.rs @@ -431,9 +431,6 @@ fn attest_certifications(config: Config, m: &ArgMatches) crypto::hash::{Hash, Digest}, types::HashAlgorithm, }; - #[allow(non_upper_case_globals)] - const SignatureType__AttestedKey: SignatureType = - SignatureType::Unknown(0x16); // Attest to all certifications? let all = ! m.is_present("none"); // All is the default. @@ -452,7 +449,7 @@ fn attest_certifications(config: Config, m: &ArgMatches) let key = Cert::from_packets(key.into_packets().filter(|p| { !matches!( p, - Packet::Signature(s) if s.typ() == SignatureType__AttestedKey + Packet::Signature(s) if s.typ() == SignatureType::AttestationKey ) }))?; @@ -492,7 +489,7 @@ fn attest_certifications(config: Config, m: &ArgMatches) for digests in attestations.chunks(digests_per_sig) { attestation_signatures.push( - SignatureBuilder::new(SignatureType__AttestedKey) + SignatureBuilder::new(SignatureType::AttestationKey) .set_signature_creation_time(t)? .set_attested_certifications(digests)? .sign_hash(&mut pk_signer, hash.clone())?); @@ -524,7 +521,7 @@ fn attest_certifications(config: Config, m: &ArgMatches) for digests in attestations.chunks(digests_per_sig) { attestation_signatures.push( - SignatureBuilder::new(SignatureType__AttestedKey) + SignatureBuilder::new(SignatureType::AttestationKey) .set_signature_creation_time(t)? .set_attested_certifications(digests)? .sign_hash(&mut pk_signer, hash.clone())?); |