2009-02-15 [colin] 3.7.0cvs66
[claws.git] / src / plugins / pgpcore / sgpgme.c
index 0138cfac9c1d86ce248ba8a519019bcc5b43b94e..8d948381aed71d55500a0c07966a454ca6e5539b 100644 (file)
@@ -511,14 +511,22 @@ gboolean sgpgme_setup_signers(gpgme_ctx_t ctx, PrefsAccount *account,
                        do {
                                err = gpgme_op_keylist_next(ctx, &key);
                                if (!err && key && key->protocol == gpgme_get_protocol(ctx) &&
-                                   !key->expired && !key->revoked)
+                                   !key->expired && !key->revoked && !key->disabled)
                                        break;
                                if (!err && key && key->protocol != gpgme_get_protocol(ctx)) {
                                        debug_print("skipping a key (wrong protocol %d)\n", key->protocol);
                                        gpgme_key_release(key);
                                }
-                               if (!err && key && (key->expired || key->revoked)) {
-                                       debug_print("skipping a key (%s)\n", key->expired?"expired":"revoked");
+                               if (!err && key && (key->expired || key->revoked || key->disabled)) {
+                                       
+                                       debug_print("skipping a key");
+                                       if (key->expired) 
+                                               debug_print(" expired");
+                                       if (key->revoked) 
+                                               debug_print(" revoked");
+                                       if (key->disabled) 
+                                               debug_print(" disabled");
+                                       debug_print("\n");
                                        gpgme_key_release(key);
                                }
                        } while (!err);
@@ -532,14 +540,21 @@ gboolean sgpgme_setup_signers(gpgme_ctx_t ctx, PrefsAccount *account,
                do {
                        err = gpgme_op_keylist_next(ctx, &key2);
                        if (!err && key2 && key2->protocol == gpgme_get_protocol(ctx) &&
-                           !key2->expired && !key2->revoked)
+                           !key2->expired && !key2->revoked && !key2->disabled)
                                break;
                        if (!err && key && key2->protocol != gpgme_get_protocol(ctx)) {
                                debug_print("skipping a key (wrong protocol %d)\n", key2->protocol);
                                gpgme_key_release(key2);
                        }
-                       if (!err && key && (key2->expired || key2->revoked)) {
-                               debug_print("skipping a key (%s)\n", key2->expired?"expired":"revoked");
+                       if (!err && key && (key2->expired || key2->revoked || key2->disabled)) {
+                                       debug_print("skipping a key");
+                                       if (key2->expired) 
+                                               debug_print(" expired");
+                                       if (key2->revoked) 
+                                               debug_print(" revoked");
+                                       if (key2->disabled) 
+                                               debug_print(" disabled");
+                                       debug_print("\n");
                                gpgme_key_release(key2);
                        }
                } while (!err);