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

Diff of /trunk/Src/wptClipDecryptDlg.cpp

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

revision 24 by twoaday, Sat Oct 8 10:43:08 2005 UTC revision 25 by twoaday, Wed Oct 12 10:04:26 2005 UTC
# Line 35  Line 35 
35  #include "wptFileManager.h"  #include "wptFileManager.h"
36  #include "../resource.h"  #include "../resource.h"
37    
38    bool secret_key_available (gpgme_recipient_t rset);
39    
40  /* Return the primary user-ID of the key with the keyid @keyid.  /* Return the primary user-ID of the key with the keyid @keyid.
41     Caller must free string. */     Caller must free string. */
42  char*  char*
# Line 117  clip_decrypt_dlg (HWND hwnd) Line 119  clip_decrypt_dlg (HWND hwnd)
119          agent_del_cache (pwd.keyid);          agent_del_cache (pwd.keyid);
120    
121      res = gpgme_op_decrypt_result (ctx);      res = gpgme_op_decrypt_result (ctx);
122      if (err == gpg_error (GPG_ERR_NO_SECKEY) && res->recipients) {      if (err && res->recipients && !secret_key_available (res->recipients)) {
123          gpgme_recipient_t r = res->recipients;          gpgme_recipient_t r = res->recipients;
124          char *p = get_key_userid (r->keyid+8);          char *p = get_key_userid (r->keyid+8);
125                    
# Line 129  clip_decrypt_dlg (HWND hwnd) Line 131  clip_decrypt_dlg (HWND hwnd)
131          goto leave;          goto leave;
132      }      }
133      else if (err) {      else if (err) {
134          gpgme_pgptype_t pgp_type;          gpg_pgptype_t pgp_type;
135          gpgme_clip_get_pgptype (&pgp_type);          gpg_clip_get_pgptype (&pgp_type);
136          if (err == gpg_error (GPG_ERR_NO_DATA) && (pgp_type & PGP_MESSAGE))          if (gpgme_err_code (err) == GPG_ERR_NO_DATA && (pgp_type & PGP_MESSAGE))
137              msg_box (hwnd, _("Broken OpenPGP message (maybe: quoted printable "              msg_box (hwnd, _("Broken OpenPGP message (maybe: quoted printable "
138                               "character in armor)."), _("Decryption"), MB_INFO);                               "character in armor)."), _("Decryption"), MB_INFO);
139          else          else

Legend:
Removed from v.24  
changed lines
  Added in v.25

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26