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