Don't encrypt with a public key for which the email matches,
[claws.git] / src / plugins / pgpcore / select-keys.c
index 30c9e0bb77362f1bb3326ae112730e2238c7f532..423675c294e5881427810a050729ed0cb8695c8c 100644 (file)
@@ -308,6 +308,8 @@ fill_clist (struct select_keys_s *sk, const char *pattern, gpgme_protocol_t prot
 
                if (!uid->email)
                        continue;
+               if (uid->revoked || uid->invalid)
+                       continue;
                raw_mail = g_strdup(uid->email);
                extract_address(raw_mail);
                if (!strcasecmp(pattern, raw_mail)) {