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

Diff of /trunk/Src/wptGPG.cpp

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

revision 42 by werner, Fri Oct 28 08:25:30 2005 UTC revision 69 by twoaday, Sat Nov 5 12:28:12 2005 UTC
# Line 22  Line 22 
22  #endif  #endif
23    
24  #include <windows.h>  #include <windows.h>
25  #include <windows.h>  #include <shlobj.h>
26  #include <string.h>  #include <string.h>
27  #include <stdio.h>  #include <stdio.h>
28  #include <shlobj.h>  #include <shlobj.h>
# Line 31  Line 31 
31  #include <time.h>  #include <time.h>
32    
33  #include "wptGPG.h"  #include "wptGPG.h"
34  #include "wptGPGCmds.h"  #include "wptGpgCmds.h"
35  #include "wptGPGOptSkel.h"  #include "wptGPGOptSkel.h"
36  #include "wptTypes.h"  #include "wptTypes.h"
37  #include "wptNLS.h"  #include "wptNLS.h"
# Line 156  get_gnupg_keyring (int pub, int strict) Line 156  get_gnupg_keyring (int pub, int strict)
156          free_if_alloc (path);          free_if_alloc (path);
157          return keyring;          return keyring;
158      }      }
159      if (file_exist_check (keyring) || get_file_size (keyring) == 0) {      if (file_exist_check (keyring) || pub && get_file_size (keyring) == 0) {
160          free_if_alloc (keyring);          free_if_alloc (keyring);
161          optfile = make_filename (path, GPG_CONF, NULL);          optfile = make_filename (path, GPG_CONF, NULL);
162          keyring = get_gnupg_keyring_from_options (optfile, pub);          keyring = get_gnupg_keyring_from_options (optfile, pub);
# Line 170  get_gnupg_keyring (int pub, int strict) Line 170  get_gnupg_keyring (int pub, int strict)
170  /* Return the full path (with the gpg exe name). First the registry is scanned  /* Return the full path (with the gpg exe name). First the registry is scanned
171     for the entry 'gpgProgram'. If it wasn't set, the default path is the     for the entry 'gpgProgram'. If it wasn't set, the default path is the
172     appended string 'gpg.exe' is used. */     appended string 'gpg.exe' is used. */
173    
174    /* FIXME:  Use gpgme's engine info here. */
175  char*  char*
176  get_gnupg_prog (void)  get_gnupg_prog (void)
177  {      {    
178      char *p;      char *p;
179      char *pgm = NULL;      char *pgm = NULL;
     size_t nlen = 0;  
180    
181      p = get_reg_entry_gpg ("gpgProgram");      p = get_reg_entry_gpg ("gpgProgram");
182      if (!p) {      if (!p) {
# Line 215  default_key_from_cache (int *ret_no_usea Line 216  default_key_from_cache (int *ret_no_usea
216              break;              break;
217          }          }
218      }      }
219      if (!keyid) {      if (!keyid)
220          *ret_no_useable = 1;          *ret_no_useable = 1;
         msg_box (NULL, _("No useable secret key found."), _("GPG Error"), MB_ERR);  
     }  
221      return keyid;      return keyid;
222  }  }
223    
# Line 358  check_gnupg_engine (int *r_major, int *r Line 357  check_gnupg_engine (int *r_major, int *r
357          gpgme_release (ctx);          gpgme_release (ctx);
358          return rc;          return rc;
359      }      }
360    
361        /* FIXME: This check is wrong! */
362      if (major < *r_major || minor < *r_minor)      if (major < *r_major || minor < *r_minor)
363          rc = 1;          rc = 1;
364      else {      else {
# Line 852  gnupg_check_homedir (void) Line 853  gnupg_check_homedir (void)
853  {        {      
854      char *homedir = NULL;      char *homedir = NULL;
855      char *prog = NULL;      char *prog = NULL;
856      int rc = 0, ec = 0;      int rc = 0;
857            
858      rc = check_homedir ();      rc = check_homedir ();
859      if (rc)      if (rc)

Legend:
Removed from v.42  
changed lines
  Added in v.69

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26