From a6d2f0529a6f98329920352b4a4de0c34666aa1a Mon Sep 17 00:00:00 2001 From: TommyLike Date: Mon, 11 Sep 2023 16:12:52 +0800 Subject: [PATCH] Bump pgp version --- Cargo.toml | 2 +- src/infra/sign_plugin/openpgp.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3f6a7ef..864a7fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ rand="0.8.5" generic-array = "0.14.6" chrono = { version = "0.4.23", features = ["clock"]} hex = "0.4.3" -pgp = "0.9.0" +pgp = "0.10.2" smallvec = "1.10.0" validator = { version = "0.16", features = ["derive"] } num_cpus = "1.15.0" diff --git a/src/infra/sign_plugin/openpgp.rs b/src/infra/sign_plugin/openpgp.rs index 5d35128..ca24fad 100644 --- a/src/infra/sign_plugin/openpgp.rs +++ b/src/infra/sign_plugin/openpgp.rs @@ -23,6 +23,7 @@ use pgp::composed::signed_key::{SignedSecretKey, SignedPublicKey}; use pgp::composed::{key::SecretKeyParamsBuilder}; use pgp::crypto::{hash::HashAlgorithm, sym::SymmetricKeyAlgorithm}; use pgp::packet::SignatureConfig; +use pgp::packet::{Subpacket, SubpacketData}; use pgp::packet::*; use pgp::types::KeyTrait; @@ -225,8 +226,8 @@ impl SignPlugins for OpenPGPPlugin { created: Some(now), unhashed_subpackets: vec![], hashed_subpackets: vec![ - Subpacket::SignatureCreationTime(now), - Subpacket::Issuer(secret_key_id), + Subpacket::regular(SubpacketData::SignatureCreationTime(now)), + Subpacket::regular(SubpacketData::Issuer(secret_key_id)), ], }; let read_cursor = Cursor::new(content); -- Gitee