35 |
#include "wptContext.h" |
#include "wptContext.h" |
36 |
#include "wptCardEdit.h" |
#include "wptCardEdit.h" |
37 |
|
|
38 |
HINSTANCE glob_hinst; /* global instance for the dialogs */ |
#define MIN_GPG_VER "1.4.3" |
39 |
HWND glob_hwnd; /* global window handle for the dialogs */ |
|
40 |
|
HINSTANCE glob_hinst; /* global instance for the dialogs */ |
41 |
|
HWND glob_hwnd; /* global window handle for the dialogs */ |
42 |
HWND activ_hwnd; |
HWND activ_hwnd; |
43 |
LOCK mo_file; |
LOCK mo_file; |
44 |
int scard_support = 0; |
int scard_support = 0; |
47 |
int gpg_read_only = 0; |
int gpg_read_only = 0; |
48 |
char gpgver[3]; |
char gpgver[3]; |
49 |
|
|
50 |
|
|
51 |
|
/* Load the key cache and rebuild the signature cache. */ |
52 |
static void |
static void |
53 |
update_keycache (HWND hwnd) |
update_keycache (HWND hwnd) |
54 |
{ |
{ |
58 |
rcs.tr_update = 1; |
rcs.tr_update = 1; |
59 |
DialogBoxParam (glob_hinst, (LPCSTR)IDD_WINPT_KEYCACHE, hwnd, |
DialogBoxParam (glob_hinst, (LPCSTR)IDD_WINPT_KEYCACHE, hwnd, |
60 |
keycache_dlg_proc, (LPARAM)&rcs); |
keycache_dlg_proc, (LPARAM)&rcs); |
61 |
} /* update_keycache */ |
} |
62 |
|
|
63 |
|
|
64 |
/* Set GPGME debug mode. If @val is 0, the debug mode is disabled. */ |
/* Set GPGME debug mode. If @val is 0, the debug mode is disabled. */ |
155 |
static int |
static int |
156 |
check_crypto_engine (void) |
check_crypto_engine (void) |
157 |
{ |
{ |
158 |
int ma=1, mi=4, pa=1; /* GPG 1.4.1 */ |
int ma=1, mi=4, pa=3; /* GPG 1.4.3 */ |
159 |
int rc; |
int rc; |
160 |
|
|
161 |
rc = check_gnupg_engine (&ma, &mi, &pa); |
rc = check_gnupg_engine (&ma, &mi, &pa); |
166 |
else if (rc) { |
else if (rc) { |
167 |
log_box (_("WinPT Error"), MB_ERR, |
log_box (_("WinPT Error"), MB_ERR, |
168 |
_("Sorry, you need a newer GPG version.\n" |
_("Sorry, you need a newer GPG version.\n" |
169 |
"GPG version %d.%d.%d required GPG version 1.4.0"), |
"GPG version %d.%d.%d required GPG version "MIN_GPG_VER), |
170 |
ma, mi, pa); |
ma, mi, pa); |
171 |
return rc; |
return rc; |
172 |
} |
} |