40 |
#include "wptCardEdit.h" |
#include "wptCardEdit.h" |
41 |
#include "wptCrypto.h" |
#include "wptCrypto.h" |
42 |
|
|
43 |
#define MIN_GPG_VER "1.4.3" /* Minimal GPG version. */ |
#define MIN_GPG_VER "1.4.2" /* Minimal GPG version. */ |
44 |
#define MIN_GPGME_VER "1.2.0" /* Minimal GPGME version. */ |
#define MIN_GPGME_VER "1.2.0" /* Minimal GPGME version. */ |
|
#define MIN_PTD_VER "0.8.1" /* Minimal PTD version. */ |
|
45 |
|
|
46 |
|
|
47 |
HINSTANCE glob_hinst; /* global instance for the dialogs */ |
HINSTANCE glob_hinst; /* global instance for the dialogs */ |
171 |
static int |
static int |
172 |
check_crypto_engine (void) |
check_crypto_engine (void) |
173 |
{ |
{ |
174 |
int ma=1, mi=4, pa=3; /* GPG 1.4.3 */ |
int ma=1, mi=4, pa=2; /* GPG 1.4.2 */ |
175 |
int rc; |
int rc; |
176 |
|
|
177 |
rc = check_gnupg_engine (&ma, &mi, &pa); |
rc = check_gnupg_engine (&ma, &mi, &pa); |
187 |
ma, mi, pa); |
ma, mi, pa); |
188 |
return rc; |
return rc; |
189 |
} |
} |
190 |
/* We enable smartcard support for GPG: 1.9 or >= 1.4 */ |
/* We enable smartcard support for GPG: >= 2 or >= 1.4.3 */ |
191 |
if ((ma == 1 && mi >= 4) || ma > 1) |
if (ma > 1 || pa >= 3) |
192 |
scard_support = 1; |
scard_support = 1; |
193 |
|
|
194 |
gpgver[0] = ma; |
gpgver[0] = ma; |
390 |
|
|
391 |
if (cmdline && stristr (cmdline, "--wipe-freespace")) { |
if (cmdline && stristr (cmdline, "--wipe-freespace")) { |
392 |
dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_SPACE_SECDEL, |
dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_SPACE_SECDEL, |
393 |
GetDesktopWindow(), space_wipefrees_dlg_proc, NULL, |
GetDesktopWindow(), space_wipefrees_dlg_proc, 0, |
394 |
_("Wipe Free Space"), IDS_WINPT_SPACE_SECDEL); |
_("Wipe Free Space"), IDS_WINPT_SPACE_SECDEL); |
395 |
free_gnupg_table (); |
free_gnupg_table (); |
396 |
return 0; |
return 0; |
403 |
update_keycache (GetDesktopWindow ()); |
update_keycache (GetDesktopWindow ()); |
404 |
if (stristr (cmdline, "keymanager")) |
if (stristr (cmdline, "keymanager")) |
405 |
dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC, |
dialog_box_param (glob_hinst, (LPCTSTR)IDD_WINPT_KEYMISC, |
406 |
GetDesktopWindow(), keymanager_dlg_proc, NULL, |
GetDesktopWindow(), keymanager_dlg_proc, 0, |
407 |
_("Key Manager"), IDS_WINPT_KEYMISC); |
_("Key Manager"), IDS_WINPT_KEYMISC); |
408 |
else { |
else { |
409 |
gpg_card_t crd = gpg_card_load (); |
gpg_card_t crd = gpg_card_load (); |