532 |
err = gpg_genkey (p, keygen_cb, &fpr); |
err = gpg_genkey (p, keygen_cb, &fpr); |
533 |
wipememory (pwd, sizeof (pwd)); |
wipememory (pwd, sizeof (pwd)); |
534 |
wipememory (pwd2, sizeof (pwd2)); |
wipememory (pwd2, sizeof (pwd2)); |
535 |
if( p ) { |
if (p) { |
536 |
wipememory (p, strlen (p)); /* burn the passphrase! */ |
wipememory (p, strlen (p)); /* burn the passphrase! */ |
537 |
free (p); |
free (p); |
538 |
} |
} |
539 |
keygen_cb_dlg_destroy (); |
keygen_cb_dlg_destroy (); |
540 |
keygen_cb (NULL, NULL, 0, 0, 0); /* flush */ |
keygen_cb (NULL, NULL, 0, 0, 0); /* flush */ |
541 |
if( err ) { |
if (err) { |
542 |
if (fpr) |
if (fpr) |
543 |
free (fpr); |
free (fpr); |
544 |
msg_box (dlg, gpgme_strerror( err ), _("Key Generation"), MB_ERR); |
msg_box (dlg, gpgme_strerror (err), _("Key Generation"), MB_ERR); |
545 |
return FALSE; |
return FALSE; |
546 |
} |
} |
547 |
status_box( dlg, _("Key Generation completed"), _("GnuPG Status") ); |
status_box (dlg, _("Key Generation completed"), _("GnuPG Status")); |
548 |
|
|
549 |
keycache_update (0, fpr); |
keycache_update (0, fpr); |
550 |
keycache_update (1, fpr); |
keycache_update (1, fpr); |
551 |
if (ctx != NULL && ctx->first_start == 0) |
if (ctx != NULL && ctx->first_start == 0) |
552 |
get_pubkey (fpr, &ctx->newkey); |
get_pubkey (fpr, &ctx->newkey); |
553 |
if (fpr) |
safe_free (fpr); |
|
free (fpr); |
|
554 |
|
|
555 |
clear_dlg_fields (dlg); |
clear_dlg_fields (dlg); |
556 |
backup_keyrings (dlg); |
backup_keyrings (dlg); |
596 |
SetWindowText (dlg, _("Key Generation Wizard")); |
SetWindowText (dlg, _("Key Generation Wizard")); |
597 |
SetDlgItemText (dlg, IDCANCEL, _("&Cancel")); |
SetDlgItemText (dlg, IDCANCEL, _("&Cancel")); |
598 |
SetDlgItemText (dlg, IDC_KEYWIZARD_EXPERT, _("E&xpert")); |
SetDlgItemText (dlg, IDC_KEYWIZARD_EXPERT, _("E&xpert")); |
|
|
|
599 |
SetForegroundWindow (dlg); |
SetForegroundWindow (dlg); |
600 |
center_window (dlg, NULL); |
center_window (dlg, NULL); |
601 |
break; |
break; |