From 235c5eff6c1a55bc1079d0fc6a42e092798aed16 Mon Sep 17 00:00:00 2001 From: Nguyen Van Nguyen Date: Wed, 3 Jan 2024 14:41:35 +0700 Subject: [PATCH] WIP Signed-off-by: Nguyen Van Nguyen --- lib/src/packet/signature/preferred_aead_algorithms.dart | 2 +- lib/src/type/subkey.dart | 4 ++-- lib/src/type/user.dart | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/packet/signature/preferred_aead_algorithms.dart b/lib/src/packet/signature/preferred_aead_algorithms.dart index bea19ae1..b6fe93d1 100644 --- a/lib/src/packet/signature/preferred_aead_algorithms.dart +++ b/lib/src/packet/signature/preferred_aead_algorithms.dart @@ -14,7 +14,7 @@ class PreferredAeadAlgorithms extends SignatureSubpacket { super.critical, super.isLong, }) : super( - SignatureSubpacketType.preferredCompressionAlgorithms, + SignatureSubpacketType.preferredAeadAlgorithms, data, ); diff --git a/lib/src/type/subkey.dart b/lib/src/type/subkey.dart index 18a1e990..d3c6e693 100644 --- a/lib/src/type/subkey.dart +++ b/lib/src/type/subkey.dart @@ -84,7 +84,7 @@ class Subkey { if (mainKey != null) { for (final signature in bindingSignatures) { if (!await signature.verify( - await mainKey!.toPublic.getVerificationKeyPacket(), + mainKey!.keyPacket, Uint8List.fromList([ ...mainKey!.keyPacket.writeForSign(), ...keyPacket.writeForSign(), @@ -106,7 +106,7 @@ class Subkey { for (var revocation in revocationSignatures) { if (signature == null || revocation.issuerKeyID.id == signature.issuerKeyID.id) { if (await revocation.verify( - await mainKey!.toPublic.getVerificationKeyPacket(), + mainKey!.keyPacket, Uint8List.fromList([ ...mainKey!.keyPacket.writeForSign(), ...keyPacket.writeForSign(), diff --git a/lib/src/type/user.dart b/lib/src/type/user.dart index e86ea692..312c4f20 100644 --- a/lib/src/type/user.dart +++ b/lib/src/type/user.dart @@ -41,7 +41,7 @@ class User { for (var revocation in revocationSignatures) { if (signature == null || revocation.issuerKeyID.id == signature.issuerKeyID.id) { if (await revocation.verifyUserCertification( - await mainKey!.toPublic.getVerificationKeyPacket(), + mainKey!.keyPacket, userID: userID, userAttribute: userAttribute, date: date, @@ -63,7 +63,7 @@ class User { if (mainKey != null) { for (final signature in selfCertifications) { if (!await signature.verifyUserCertification( - await mainKey!.toPublic.getVerificationKeyPacket(), + mainKey!.keyPacket, userID: userID, userAttribute: userAttribute, date: date,