refactor(pgp): do not use legacy key ID except for IssuerKeyId subpacket

This commit is contained in:
link2xt
2026-02-25 17:05:05 +00:00
committed by l
parent 692e1019b0
commit 8df9b9e4d9
2 changed files with 4 additions and 20 deletions

View File

@@ -10,7 +10,7 @@ use deltachat_contact_tools::EmailAddress;
use pgp::composed::Deserializable;
pub use pgp::composed::{SignedPublicKey, SignedSecretKey};
use pgp::ser::Serialize;
use pgp::types::{KeyDetails, KeyId};
use pgp::types::KeyDetails;
use tokio::runtime::Handle;
use crate::context::Context;
@@ -112,9 +112,6 @@ pub trait DcKey: Serialize + Deserializable + Clone {
/// Whether the key is private (or public).
fn is_private() -> bool;
/// Returns the OpenPGP Key ID.
fn key_id(&self) -> KeyId;
}
/// Attempts to load own public key.
@@ -262,10 +259,6 @@ impl DcKey for SignedPublicKey {
fn dc_fingerprint(&self) -> Fingerprint {
self.fingerprint().into()
}
fn key_id(&self) -> KeyId {
KeyDetails::legacy_key_id(self)
}
}
impl DcKey for SignedSecretKey {
@@ -289,10 +282,6 @@ impl DcKey for SignedSecretKey {
fn dc_fingerprint(&self) -> Fingerprint {
self.fingerprint().into()
}
fn key_id(&self) -> KeyId {
KeyDetails::legacy_key_id(&**self)
}
}
async fn generate_keypair(context: &Context) -> Result<SignedSecretKey> {