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

Diff of /trunk/Src/wptPassphraseCB.cpp

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

revision 32 by twoaday, Mon Oct 24 08:03:48 2005 UTC revision 33 by twoaday, Tue Oct 25 07:46:20 2005 UTC
# Line 65  passphrase_callback_proc (HWND dlg, UINT Line 65  passphrase_callback_proc (HWND dlg, UINT
65      gpgme_decrypt_result_t res;      gpgme_decrypt_result_t res;
66      gpgme_sign_result_t res_sig;      gpgme_sign_result_t res_sig;
67      gpgme_key_t key;      gpgme_key_t key;
68        gpgme_recipient_t recip, r;
69      void *ctx = NULL, *item;      void *ctx = NULL, *item;
70      const char *id;      const char *id;
71      char *info;      char *info;
# Line 83  passphrase_callback_proc (HWND dlg, UINT Line 84  passphrase_callback_proc (HWND dlg, UINT
84          }          }
85          else if (c->gpg_cmd == GPG_CMD_SIGN)          else if (c->gpg_cmd == GPG_CMD_SIGN)
86              CheckDlgButton (dlg, IDC_DECRYPT_SIGN_HIDE, BST_CHECKED);              CheckDlgButton (dlg, IDC_DECRYPT_SIGN_HIDE, BST_CHECKED);
87          res = gpgme_op_decrypt_result (c->gpg);          if (c->recipients)
88          if (res != NULL && c->gpg_cmd == GPG_CMD_DECRYPT) {              recip = c->recipients; /* recipients were already extracted. */
89              gpgme_recipient_t r;          else {
   
90              /* XXX: not all ENCRYPT_TO entries are listed here. */              /* XXX: not all ENCRYPT_TO entries are listed here. */
91                res = gpgme_op_decrypt_result (c->gpg);
92                if (res->recipients)
93                    recip = res->recipients;
94            }
95            if (recip != NULL && c->gpg_cmd == GPG_CMD_DECRYPT) {
96              for (r = res->recipients; r; r = r->next) {              for (r = res->recipients; r; r = r->next) {
97                  get_pubkey (r->keyid, &key);                  get_pubkey (r->keyid, &key);
98                  if (key) {                  if (key) {
# Line 419  set_gpg_passphrase_cb (passphrase_cb_s * Line 424  set_gpg_passphrase_cb (passphrase_cb_s *
424  void  void
425  release_gpg_passphrase_cb (passphrase_cb_s *ctx)  release_gpg_passphrase_cb (passphrase_cb_s *ctx)
426  {  {
427        gpgme_recipient_t r, n;
428    
429      if (!ctx)      if (!ctx)
430          return;          return;
431      sfree_if_alloc (ctx->pwd);      sfree_if_alloc (ctx->pwd);
432      free_if_alloc (ctx->title);      free_if_alloc (ctx->title);
433        r = ctx->recipients;
434        while (r) {
435            n = r->next;
436            safe_free (r->keyid);
437            safe_free (r);
438            r = n;
439        }
440  }  }
441    
442    

Legend:
Removed from v.32  
changed lines
  Added in v.33

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26