440 |
else |
else |
441 |
s = _("Please enter the PIN"); |
s = _("Please enter the PIN"); |
442 |
cb->which = which; |
cb->which = which; |
443 |
free_if_alloc (cb->info_text); |
free_if_alloc( cb->info_text ); |
444 |
if( card ) { |
if( card ) { |
445 |
fmt = _("%s\nName: %s %s\nSerial-No: %s\n"); |
fmt = _("%s\nName: %s %s\nSerial-No: %s\n"); |
446 |
n1 = card->givenname; |
n1 = card->givenname; |
583 |
char pass[128]; |
char pass[128]; |
584 |
int card_flags = GPG_CARDFLAG_NONE; |
int card_flags = GPG_CARDFLAG_NONE; |
585 |
int expires=0, valid=0; |
int expires=0, valid=0; |
586 |
size_t n; |
DWORD n; |
587 |
|
|
588 |
switch (msg) { |
switch (msg) { |
589 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
603 |
SetDlgItemText (dlg, IDC_CKEYGEN_PWDINF, _("Off-card passphrase")); |
SetDlgItemText (dlg, IDC_CKEYGEN_PWDINF, _("Off-card passphrase")); |
604 |
SetDlgItemText (dlg, IDC_CKEYGEN_NEVER, _("&Never")); |
SetDlgItemText (dlg, IDC_CKEYGEN_NEVER, _("&Never")); |
605 |
SetDlgItemText (dlg, IDC_CKEYGEN_MAILINF, _("Email &address")); |
SetDlgItemText (dlg, IDC_CKEYGEN_MAILINF, _("Email &address")); |
606 |
|
SetDlgItemText (dlg, IDC_CKEYGEN_REPLACE, _("Overwrite old keys on the card")); |
607 |
|
SetDlgItemText (dlg, IDC_CKEYGEN_BACKUP, _("Make off-card backup of encryption key")); |
608 |
SetWindowText (dlg, _("Card Key Generation")); |
SetWindowText (dlg, _("Card Key Generation")); |
609 |
return FALSE; |
return FALSE; |
610 |
|
|
767 |
gpgme_error_t err; |
gpgme_error_t err; |
768 |
GpgCardEdit *ce; |
GpgCardEdit *ce; |
769 |
char pold[128], pnew[128], pnew2[128]; |
char pold[128], pnew[128], pnew2[128]; |
770 |
int which=0; |
int which = 0; |
771 |
size_t n; |
DWORD n; |
772 |
|
|
773 |
switch( msg ) { |
switch( msg ) { |
774 |
case WM_INITDIALOG: |
case WM_INITDIALOG: |
794 |
SendMessage (hwnd, EM_SETPASSWORDCHAR, hide? '*' : 0, 0); |
SendMessage (hwnd, EM_SETPASSWORDCHAR, hide? '*' : 0, 0); |
795 |
SetFocus (hwnd); |
SetFocus (hwnd); |
796 |
} |
} |
797 |
switch( LOWORD( wparam ) ) { |
switch (LOWORD (wparam)) { |
798 |
case IDOK: |
case IDOK: |
799 |
if (IsDlgButtonChecked (dlg, IDC_CHPIN_ISADMIN)) |
if (IsDlgButtonChecked (dlg, IDC_CHPIN_ISADMIN)) |
800 |
which = CARD_ADMIN_PIN; |
which = CARD_ADMIN_PIN; |
814 |
GetDlgItemText (dlg, IDC_CHPIN_NEWPIN, pnew, sizeof (pnew)-1); |
GetDlgItemText (dlg, IDC_CHPIN_NEWPIN, pnew, sizeof (pnew)-1); |
815 |
GetDlgItemText (dlg, IDC_CHPIN_NEWPIN2, pnew2, sizeof (pnew2)-1); |
GetDlgItemText (dlg, IDC_CHPIN_NEWPIN2, pnew2, sizeof (pnew2)-1); |
816 |
if (strcmp (pnew, pnew2)) { |
if (strcmp (pnew, pnew2)) { |
817 |
|
wipememory (pnew2, sizeof (pnew2)); |
818 |
|
wipememory (pnew, sizeof (pnew)); |
819 |
msg_box (dlg, _("Passphrases do not match. Please try again."), |
msg_box (dlg, _("Passphrases do not match. Please try again."), |
820 |
_("Card Edit"), MB_ERR); |
_("Card Edit"), MB_ERR); |
821 |
return TRUE; |
return TRUE; |