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

Diff of /trunk/Src/wptSymEnc.cpp

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

revision 23 by twoaday, Fri Sep 30 10:10:16 2005 UTC revision 24 by twoaday, Sat Oct 8 10:43:08 2005 UTC
# Line 19  Line 19 
19   */   */
20    
21  #include <windows.h>  #include <windows.h>
 #include <io.h>  
22    
23  #include "wptGPG.h"  #include "wptGPG.h"
24  #include "wptCommonCtl.h"  #include "wptCommonCtl.h"
# Line 38  sym_passphrase_cb (void *hook, const cha Line 37  sym_passphrase_cb (void *hook, const cha
37                     int prev_was_bad, int fd)                     int prev_was_bad, int fd)
38  {  {
39      const char *pass = (const char*)hook;      const char *pass = (const char*)hook;
40        HANDLE hd = (HANDLE)fd;
41        DWORD n;
42    
43      if (!pass)      if (!pass)
44          return gpg_error (GPG_ERR_INV_ARG);          return gpg_error (GPG_ERR_INV_ARG);
45      write (fd, pass, strlen (pass));  
46      write (fd, "\n", 1);      if (!WriteFile (hd, pass, strlen (pass), &n, NULL))
47            log_debug ("sym_passphrase_cb: WriteFile() failed ec=%d\n", w32_errno);
48        if (!WriteFile (hd, "\n", 1, &n, NULL))
49            log_debug ("sym_passphrase_cb: WriteFile() failed ec=%d\n", w32_errno);
50        
51      return 0;      return 0;
52  }  }
53    
# Line 78  gpg_encrypt_symmetric (void) Line 83  gpg_encrypt_symmetric (void)
83          msg_box (NULL, gpgme_strerror (rc), _("Symmetric Encryption"), MB_ERR);          msg_box (NULL, gpgme_strerror (rc), _("Symmetric Encryption"), MB_ERR);
84      else {      else {
85          show_msg (GetDesktopWindow (), 1500, _("GnuPG Status: Finished"));          show_msg (GetDesktopWindow (), 1500, _("GnuPG Status: Finished"));
86          gpg_data_release_and_set_clipboard (ciph, 0);          gpg_data_release_and_set_clipboard (ciph, 1);
87          ciph = NULL;          ciph = NULL;
88      }      }
89    

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26