Don't encrypt with a public key for which the email matches,
[claws.git] / src / plugins / pgpcore / select-keys.c
index 30c9e0b..423675c 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->email)
                        continue;
+               if (uid->revoked || uid->invalid)
+                       continue;
                raw_mail = g_strdup(uid->email);
                extract_address(raw_mail);
                if (!strcasecmp(pattern, raw_mail)) {
                raw_mail = g_strdup(uid->email);
                extract_address(raw_mail);
                if (!strcasecmp(pattern, raw_mail)) {