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

Diff of /trunk/Src/wptClipSignDlg.cpp

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

revision 36 by werner, Thu Oct 27 15:25:13 2005 UTC revision 77 by twoaday, Mon Nov 14 15:01:01 2005 UTC
# Line 24  Line 24 
24  #endif  #endif
25    
26  #include <windows.h>  #include <windows.h>
 #include <windows.h>  
27  #include <commctrl.h>  #include <commctrl.h>
28    
29  #include "../resource.h"  #include "resource.h"
30  #include "wptTypes.h"  #include "wptTypes.h"
31  #include "wptAgent.h"  #include "wptAgent.h"
32  #include "wptNLS.h"  #include "wptNLS.h"
# Line 90  leave: Line 89  leave:
89    
90    
91  /* This function is used when only one secret key is available.  /* This function is used when only one secret key is available.
92   * it doesn't make sense to offer a dialog for this case.     it doesn't make sense to offer a dialog for this case. */
  */  
93  void  void
94  one_key_proc (HWND dlg)  one_key_proc (HWND dlg)
95  {  {
96      char * signer;      char *signer;
97      gpgme_ctx_t ctx;      gpgme_ctx_t ctx;
98      gpgme_error_t err;      gpgme_error_t err;
99      passphrase_cb_s pwd;      passphrase_cb_s pwd;
     int rc = 0;  
100      int n = reg_prefs.word_wrap;      int n = reg_prefs.word_wrap;
101            
102      signer = get_gnupg_default_key ();      signer = get_gnupg_default_key ();
# Line 113  one_key_proc (HWND dlg) Line 110  one_key_proc (HWND dlg)
110          BUG (dlg);          BUG (dlg);
111    
112      set_gpg_passphrase_cb (&pwd, ctx, GPG_CMD_SIGN, dlg, _("Signing"));      set_gpg_passphrase_cb (&pwd, ctx, GPG_CMD_SIGN, dlg, _("Signing"));
113      err = gpg_clip_sign (ctx, signer, n );      err = gpg_clip_sign (ctx, signer, n);
     wipememory (pwd.pwd, sizeof (pwd.pwd));  
114      if (gpgme_err_code (err) == GPG_ERR_BAD_PASSPHRASE)      if (gpgme_err_code (err) == GPG_ERR_BAD_PASSPHRASE)
115          agent_del_cache (pwd.keyid);          agent_del_cache (pwd.keyid);
116      if (err)      if (err)
# Line 123  one_key_proc (HWND dlg) Line 119  one_key_proc (HWND dlg)
119          show_msg (dlg, 1500, _("GnuPG Status: Finished"));          show_msg (dlg, 1500, _("GnuPG Status: Finished"));
120      gpgme_release (ctx);      gpgme_release (ctx);
121      free_if_alloc (signer);      free_if_alloc (signer);
122        release_gpg_passphrase_cb (&pwd);
123  }  }
124    
125    
# Line 174  clip_sign_dlg_proc (HWND dlg, UINT msg, Line 171  clip_sign_dlg_proc (HWND dlg, UINT msg,
171          notify = (NMHDR *)lparam;          notify = (NMHDR *)lparam;
172          if( notify && notify->code == NM_DBLCLK          if( notify && notify->code == NM_DBLCLK
173              && notify->idFrom == IDC_SIGN_KEYLIST )              && notify->idFrom == IDC_SIGN_KEYLIST )
174              PostMessage( dlg, WM_COMMAND, MAKEWPARAM(IDOK, 0), NULL );              PostMessage (dlg, WM_COMMAND, MAKEWPARAM(IDOK, 0), 0);
175          return TRUE;          return TRUE;
176                    
177      case WM_SYSCOMMAND:      case WM_SYSCOMMAND:
# Line 245  clip_sign_dlg_proc (HWND dlg, UINT msg, Line 242  clip_sign_dlg_proc (HWND dlg, UINT msg,
242            
243      return FALSE;      return FALSE;
244  }  }
   

Legend:
Removed from v.36  
changed lines
  Added in v.77

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26