427 |
return FALSE; |
return FALSE; |
428 |
} |
} |
429 |
if (!GetDlgItemText (dlg, IDC_KEYGEN_EMAIL, email, sizeof (email) -1) |
if (!GetDlgItemText (dlg, IDC_KEYGEN_EMAIL, email, sizeof (email) -1) |
430 |
|| !strchr (email, '@')) { |
|| check_email_address (email)) { |
431 |
msg_box (dlg, _("Please enter a valid email address."), |
msg_box (dlg, _("Please enter a valid email address."), |
432 |
_("Key Generation"), MB_ERR); |
_("Key Generation"), MB_ERR); |
433 |
return FALSE; |
return FALSE; |
472 |
char *utf8_name, *utf8_comment; |
char *utf8_name, *utf8_comment; |
473 |
utf8_name = native_to_utf8 (name); |
utf8_name = native_to_utf8 (name); |
474 |
utf8_comment = native_to_utf8 (comment); |
utf8_comment = native_to_utf8 (comment); |
475 |
if (!utf8_name || !utf8_comment) |
if( !utf8_name || !utf8_comment ) |
476 |
BUG (0); |
BUG (0); |
477 |
p = gpg_genkey_params (keytype, bits, utf8_name, utf8_comment, |
p = gpg_genkey_params (keytype, bits, utf8_name, utf8_comment, |
478 |
email, expire, pwd); |
email, expire, pwd); |
572 |
_("Key Generation Wizard"), MB_WARN); |
_("Key Generation Wizard"), MB_WARN); |
573 |
return FALSE; |
return FALSE; |
574 |
} |
} |
575 |
if( !GetDlgItemText( dlg, IDC_KEYWIZARD_EMAIL, email, sizeof email-1 ) |
if (!GetDlgItemText(dlg, IDC_KEYWIZARD_EMAIL, email, sizeof email-1 ) |
576 |
|| !strchr( email, '@' ) ) { |
|| check_email_address (email)) { |
577 |
msg_box( dlg, _("Please enter a valid email address."), |
msg_box (dlg, _("Please enter a valid email address."), |
578 |
_("Key Generation Wizard"), MB_ERR ); |
_("Key Generation Wizard"), MB_ERR); |
579 |
return FALSE; |
return FALSE; |
580 |
} |
} |
581 |
if (strchr (email, '<') || strchr (email, '>')) { |
if (strchr (email, '<') || strchr (email, '>')) { |
587 |
if (cancel) |
if (cancel) |
588 |
return FALSE; |
return FALSE; |
589 |
utf8_name = native_to_utf8 (name); |
utf8_name = native_to_utf8 (name); |
590 |
if( !utf8_name ) |
if (!utf8_name) |
591 |
BUG( NULL ); |
BUG (0); |
592 |
if (IsDlgButtonChecked (dlg, IDC_KEYWIZARD_USERSA)) |
if (IsDlgButtonChecked (dlg, IDC_KEYWIZARD_USERSA)) |
593 |
pubkey_algo = GPG_KEYGEN_DSA_RSA; |
pubkey_algo = GPG_KEYGEN_DSA_RSA; |
594 |
p = gpg_genkey_params (pubkey_algo, DFAULT_KEYSIZE, utf8_name, |
p = gpg_genkey_params (pubkey_algo, DFAULT_KEYSIZE, utf8_name, |