/[winpt]/trunk/Include/wptGPG.h
ViewVC logotype

Diff of /trunk/Include/wptGPG.h

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

revision 25 by twoaday, Wed Oct 12 10:04:26 2005 UTC revision 33 by twoaday, Tue Oct 25 07:46:20 2005 UTC
# Line 22  Line 22 
22  #define WPT_GPG_H  #define WPT_GPG_H
23    
24  #include "w32gpgme.h"  #include "w32gpgme.h"
25    #include "wptKeyCache.h"
26  #include "wptNLS.h"  #include "wptNLS.h"
27    
28    
# Line 29  Line 30 
30    
31  #define key_is_useable(key) (!(key)->revoked && !(key)->expired && !(key)->disabled)  #define key_is_useable(key) (!(key)->revoked && !(key)->expired && !(key)->disabled)
32    
33  enum {  enum setup_t {
34      SETUP_KEYGEN    = 1,      SETUP_KEYGEN    = 1,
35      SETUP_IMPORT    = 2,      SETUP_IMPORT    = 2,
36      SETUP_EXISTING  = 3      SETUP_EXISTING  = 3
37  };  };
38    
39  enum {  enum gpg_cmd_t {
40      GPG_CMD_DECRYPT = 0,      GPG_CMD_DECRYPT = 0,
41      GPG_CMD_SIGN    = 1      GPG_CMD_SIGN    = 1
42  };  };
43    
44  enum {  enum keycache_t {
45      KEYCACHE_PRV = 0,      KEYCACHE_PRV = 0,
46      KEYCACHE_PUB = 1      KEYCACHE_PUB = 1
47  };  };
48    
49  enum {  enum entry_t {
50      ENTRY_OPAQUE = 1,      ENTRY_OPAQUE = 1,
51      ENTRY_SINGLE = 2,      ENTRY_SINGLE = 2,
52      ENTRY_MULTI  = 3,      ENTRY_MULTI  = 3,
# Line 107  static gpg_filetype gpg_filetypes[] = { Line 108  static gpg_filetype gpg_filetypes[] = {
108  };  };
109    
110  struct passphrase_cb_s {  struct passphrase_cb_s {
111      int gpg_cmd;      int gpg_cmd;        /* sign or decrypt. */
112      int pwd_init;      int pwd_init;       /* 1 = passphrase request via dialog. */
113      char *pwd;      char *pwd;          /* actual passphrase. */
114      char info[1024]; /* hold up the info message */      char info[1024];    /* hold up the info message */
115      char *title;      char *title;        /* dialog title. */
116      char keyid[16+1];      char keyid[16+1];   /* keyid of the secret key the pwd can be used for. */
117      HWND hwnd;      HWND hwnd;          /* handle of the dialog window. */
118      int cancel;      int cancel;         /* 1 = user cancelled passphrase request. */
119      int is_card;      unsigned int is_card:1; /* 1 = key stored on a smart card. */
120        unsigned int bad_pwd:1; /* 1 = last passphrase was bad. */
121      gpgme_ctx_t gpg;      gpgme_ctx_t gpg;
122        gpgme_recipient_t recipients;
123      struct {      struct {
124          int sym_algo;          int sym_algo;
125          int s2k_mode;          int s2k_mode;
# Line 162  int check_gnupg_options (const char *buf Line 165  int check_gnupg_options (const char *buf
165  void init_gnupg_table (void);  void init_gnupg_table (void);
166  void free_gnupg_table (void);  void free_gnupg_table (void);
167  int keyring_check_last_access (void);  int keyring_check_last_access (void);
168  const char* gnupg_check_file_ext (const char * fname);  const char* gnupg_check_file_ext (const char *fname, int *r_type);
169  int gpg_check_permissions (int showmsg);  int gpg_check_permissions (int showmsg);
170  int gnupg_check_homedir (void);  int gnupg_check_homedir (void);
171  int gnupg_access_keyring (int _pub);  int gnupg_access_keyring (int _pub);
# Line 172  void gnupg_display_error (void); Line 175  void gnupg_display_error (void);
175  int gnupg_copy_keyrings (void);  int gnupg_copy_keyrings (void);
176  int check_gnupg_engine (int *r_major, int *r_minor, int *r_patch);  int check_gnupg_engine (int *r_major, int *r_minor, int *r_patch);
177    
 gpg_card_t smartcard_init (void);  
   
178  /*-- wptGPGME.cpp --*/  /*-- wptGPGME.cpp --*/
179  const char * get_signature_status( gpgme_sigsum_t sigstat );  const char * get_signature_status( gpgme_sigsum_t sigstat );
180  void keycache_reload( HWND dlg );  void keycache_reload( HWND dlg );
# Line 218  void release_gpg_options( gpg_optfile_t Line 219  void release_gpg_options( gpg_optfile_t
219  void release_group( gpg_group_t grp );  void release_group( gpg_group_t grp );
220    
221  /*-- wptPassphraseCB.cpp --*/  /*-- wptPassphraseCB.cpp --*/
222  enum {  enum passdlg_t {
223      PASSDLG_REPEAT = 0,      PASSDLG_REPEAT = 0,
224      PASSDLG_INIT = 1,        PASSDLG_INIT = 1,  
225      PASSDLG_STRICT = 2      PASSDLG_STRICT = 2
# Line 247  gpgme_error_t gpg_revoke_key (const char Line 248  gpgme_error_t gpg_revoke_key (const char
248                                char **r_revcert);                                char **r_revcert);
249  gpgme_error_t gpg_decode_c_string (const char *src, char **destp, size_t len);  gpgme_error_t gpg_decode_c_string (const char *src, char **destp, size_t len);
250  gpgme_error_t gpg_import_key_list (const char *fname, char **r_out);  gpgme_error_t gpg_import_key_list (const char *fname, char **r_out);
251    gpgme_error_t get_uat_validity (const char *keyid, gpgme_validity_t *r_valid);
252    
253  #endif /* WPT_GPG_H */  #endif /* WPT_GPG_H */

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

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26