/[winpt]/trunk/Src/wptGPGME.cpp
ViewVC logotype

Diff of /trunk/Src/wptGPGME.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 259 by twoaday, Tue Aug 1 16:37:23 2006 UTC revision 260 by twoaday, Wed Aug 16 10:01:30 2006 UTC
# Line 256  get_seckey (const char *keyid, gpgme_key Line 256  get_seckey (const char *keyid, gpgme_key
256  static int  static int
257  sigsum_to_index (gpgme_sigsum_t sum)  sigsum_to_index (gpgme_sigsum_t sum)
258  {  {
259        /* xxx: gpgme should set _valid if the sig is good but the
260                key has been expired; check the code */
261        if ((sum & GPGME_SIGSUM_VALID) && (sum & GPGME_SIGSUM_SIG_EXPIRED))
262            return 8;
263      if ((sum & GPGME_SIGSUM_VALID) && (sum & GPGME_SIGSUM_KEY_REVOKED))      if ((sum & GPGME_SIGSUM_VALID) && (sum & GPGME_SIGSUM_KEY_REVOKED))
264          return 7;          return 7;
265      if ((sum & GPGME_SIGSUM_VALID) && (sum & GPGME_SIGSUM_SIG_EXPIRED))      if ((sum & GPGME_SIGSUM_VALID) && (sum & GPGME_SIGSUM_KEY_EXPIRED))
266          return 6;          return 6;
267      if (sum & GPGME_SIGSUM_GREEN)      if (sum & GPGME_SIGSUM_GREEN)
268          return 1;          return 1;
# Line 281  get_gpg_sigstat (gpgme_sigsum_t sum) Line 285  get_gpg_sigstat (gpgme_sigsum_t sum)
285          _("The signature could not be checked due to a missing key"),          _("The signature could not be checked due to a missing key"),
286          _("No valid OpenPGP signature"),          _("No valid OpenPGP signature"),
287          _("Signature Error"),          _("Signature Error"),
288          _("Good Signature (Expired Key)"),          _("Good signature (Expired Key)"),
289          _("Good Signature (Revoked Key)"),          _("Good signature (Revoked Key)"),
290            _("Good signature (Expired)"),
291          NULL          NULL
292      };      };
293      const unsigned int mask = 8;      const unsigned int mask = 9;
294    
295      return gpg_sigstat[sigsum_to_index (sum) % mask];      return gpg_sigstat[sigsum_to_index (sum) % mask];
296  }  }
297    
298    
299    /* Return true if at least one secret key is available. */
300  bool  bool
301  secret_key_available (void)  secret_key_available (void)
302  {  {

Legend:
Removed from v.259  
changed lines
  Added in v.260

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26