From cbab62fac6d4870ebf5a7deae82df2ef0cf34bf0 Mon Sep 17 00:00:00 2001 From: Nguyen Van Nguyen Date: Tue, 10 Dec 2024 16:21:20 +0700 Subject: [PATCH] WIP Signed-off-by: Nguyen Van Nguyen --- lib/src/key/base_key.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/key/base_key.dart b/lib/src/key/base_key.dart index b820b41c..aae221d6 100644 --- a/lib/src/key/base_key.dart +++ b/lib/src/key/base_key.dart @@ -152,11 +152,11 @@ abstract class BaseKey implements KeyInterface { ]) { for (final signature in directSignatures) { final subpacket = signature.getSubpacket(); - if (subpacket?.isPreferred(symmetric, aead) ?? false) { - return true; + if (subpacket != null && !subpacket.isPreferred(symmetric, aead)) { + return false; } } - return false; + return true; } @override