2009-10-20 [colin] 3.7.3cvs5
authorColin Leroy <colin@colino.net>
Tue, 20 Oct 2009 17:40:30 +0000 (17:40 +0000)
committerColin Leroy <colin@colino.net>
Tue, 20 Oct 2009 17:40:30 +0000 (17:40 +0000)
* src/plugins/pgpcore/sgpgme.c
Fix bug 1996, 'S/MIME key not selected'
Check for S/MIME certs too

ChangeLog
PATCHSETS
configure.ac
src/plugins/pgpcore/sgpgme.c

index 524a13c..258b82c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-20 [colin]     3.7.3cvs5
+
+       * src/plugins/pgpcore/sgpgme.c
+               Fix bug 1996, 'S/MIME key not selected'
+               Check for S/MIME certs too
+
 2009-10-20 [colin]     3.7.3cvs4
 
        * src/common/w32lib.h
index bd84993..7fe573f 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.21 -r 1.1.2.22 tools/claws.i18n.status.pl;  ) > 3.7.3cvs2.patchset
 ( cvs diff -u -r 1.1.4.20 -r 1.1.4.21 src/exportldif.c;  cvs diff -u -r 1.12.2.21 -r 1.12.2.22 src/ldif.c;  cvs diff -u -r 1.5.2.8 -r 1.5.2.9 src/ldif.h;  ) > 3.7.3cvs3.patchset
 ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/common/w32lib.h;  ) > 3.7.3cvs4.patchset
+( cvs diff -u -r 1.1.2.64 -r 1.1.2.65 src/plugins/pgpcore/sgpgme.c;  ) > 3.7.3cvs5.patchset
index e46ad60..7dbb077 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=3
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=4
+EXTRA_VERSION=5
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 8410ab0..eccc370 100644 (file)
@@ -855,14 +855,19 @@ gboolean sgpgme_has_secret_key(void)
                debug_print("err : %s\n", gpgme_strerror(err));
                return TRUE;
        }
+check_again:
        err = gpgme_op_keylist_start(ctx, NULL, TRUE);
        if (!err)
                err = gpgme_op_keylist_next(ctx, &key);
        gpgme_op_keylist_end(ctx);
        gpgme_release(ctx);
-       if (gpg_err_code(err) == GPG_ERR_EOF)
+       if (gpg_err_code(err) == GPG_ERR_EOF) {
+               if (gpgme_get_protocol(ctx) != GPGME_PROTOCOL_CMS) {
+                       gpgme_set_protocol(ctx, GPGME_PROTOCOL_CMS);
+                       goto check_again;
+               }
                return FALSE;
-       else
+       else
                return TRUE;
 }