- DialogBox(hinst, MAKEINTRESOURCE(214), NULL, LicenceProc);
+ DialogBox(hinst, MAKEINTRESOURCE(214), hwnd, LicenceProc);
- buffer = smalloc(strlen(key->alg->name) + 4 * ((pub_len + 2) / 3) +
- strlen(key->comment) + 3);
+ buffer = snewn(strlen(key->alg->name) + 4 * ((pub_len + 2) / 3) +
+ strlen(key->comment) + 3, char);
strcpy(buffer, key->alg->name);
p = buffer + strlen(buffer);
*p++ = ' ';
strcpy(buffer, key->alg->name);
p = buffer + strlen(buffer);
*p++ = ' ';
strcpy(p, key->comment);
SetDlgItemText(hwnd, id, buffer);
SetDlgItemText(hwnd, idstatic, "&Public key for pasting into "
strcpy(p, key->comment);
SetDlgItemText(hwnd, id, buffer);
SetDlgItemText(hwnd, idstatic, "&Public key for pasting into "
if (type != SSH_KEYTYPE_SSH1 &&
type != SSH_KEYTYPE_SSH2 &&
!import_possible(type)) {
if (type != SSH_KEYTYPE_SSH1 &&
type != SSH_KEYTYPE_SSH2 &&
!import_possible(type)) {
AppendMenu(menu1, MF_ENABLED, IDC_EXPORT_SSHCOM,
"Export &ssh.com key");
AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1,
AppendMenu(menu1, MF_ENABLED, IDC_EXPORT_SSHCOM,
"Export &ssh.com key");
AppendMenu(menu, MF_POPUP | MF_ENABLED, (UINT) menu1,
"&Public key for pasting into authorized_keys file:",
IDC_PKSTATIC, IDC_KEYDISPLAY, 5);
SendDlgItemMessage(hwnd, IDC_KEYDISPLAY, EM_SETREADONLY, 1, 0);
"&Public key for pasting into authorized_keys file:",
IDC_PKSTATIC, IDC_KEYDISPLAY, 5);
SendDlgItemMessage(hwnd, IDC_KEYDISPLAY, EM_SETREADONLY, 1, 0);
- staticedit(&cp, "Key fingerprint:", IDC_FPSTATIC,
+ staticedit(&cp, "Key f&ingerprint:", IDC_FPSTATIC,
IDC_FINGERPRINT, 75);
SendDlgItemMessage(hwnd, IDC_FINGERPRINT, EM_SETREADONLY, 1,
0);
IDC_FINGERPRINT, 75);
SendDlgItemMessage(hwnd, IDC_FINGERPRINT, EM_SETREADONLY, 1,
0);
- CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2DSA, IDC_KEYSSH1);
+ CheckRadioButton(hwnd, IDC_KEYSSH1, IDC_KEYSSH2DSA, IDC_KEYSSH2RSA);
CheckMenuRadioItem(state->keymenu, IDC_KEYSSH1, IDC_KEYSSH2DSA,
IDC_KEYSSH1, MF_BYCOMMAND);
SetDlgItemInt(hwnd, IDC_BITS, DEFAULT_KEYSIZE, FALSE);
CheckMenuRadioItem(state->keymenu, IDC_KEYSSH1, IDC_KEYSSH2DSA,
IDC_KEYSSH1, MF_BYCOMMAND);
SetDlgItemInt(hwnd, IDC_BITS, DEFAULT_KEYSIZE, FALSE);
- load_key_file(hwnd, state, cmdline_keyfile, 0);
+ load_key_file(hwnd, state, filename_from_str(cmdline_keyfile), 0);
MAKELPARAM(0, PROGRESSRANGE));
SendDlgItemMessage(hwnd, IDC_PROGRESS, PBM_SETPOS, 0, 0);
MAKELPARAM(0, PROGRESSRANGE));
SendDlgItemMessage(hwnd, IDC_PROGRESS, PBM_SETPOS, 0, 0);
params->progressbar = GetDlgItem(hwnd, IDC_PROGRESS);
params->dialog = hwnd;
params->keysize = state->keysize;
params->progressbar = GetDlgItem(hwnd, IDC_PROGRESS);
params->dialog = hwnd;
params->keysize = state->keysize;
GetWindowText(editctl, *state->commentptr, len + 1);
if (state->ssh2) {
setupbigedit2(hwnd, IDC_KEYDISPLAY, IDC_PKSTATIC,
GetWindowText(editctl, *state->commentptr, len + 1);
if (state->ssh2) {
setupbigedit2(hwnd, IDC_KEYDISPLAY, IDC_PKSTATIC,
- DialogBox(hinst, MAKEINTRESOURCE(213), NULL, AboutProc);
+ DialogBox(hinst, MAKEINTRESOURCE(213), hwnd, AboutProc);
state =
(struct MainDlgState *) GetWindowLong(hwnd, GWL_USERDATA);
if (!state->generation_thread_exists) {
state =
(struct MainDlgState *) GetWindowLong(hwnd, GWL_USERDATA);
if (!state->generation_thread_exists) {
SendDlgItemMessage(hwnd, IDC_PROGRESS, PBM_SETRANGE, 0,
MAKELPARAM(0, state->entropy_required));
SendDlgItemMessage(hwnd, IDC_PROGRESS, PBM_SETRANGE, 0,
MAKELPARAM(0, state->entropy_required));
- ret = export_ssh2(filename, type, &state->ssh2key,
+ ret = export_ssh2(&fn, type, &state->ssh2key,
- ret = export_ssh1(filename, type, &state->key,
+ ret = export_ssh1(&fn, type, &state->key,
state =
(struct MainDlgState *) GetWindowLong(hwnd, GWL_USERDATA);
if (!state->generation_thread_exists) {
char filename[FILENAME_MAX];
if (prompt_keyfile(hwnd, "Load private key:",
filename, 0, LOWORD(wParam)==IDC_LOAD))
state =
(struct MainDlgState *) GetWindowLong(hwnd, GWL_USERDATA);
if (!state->generation_thread_exists) {
char filename[FILENAME_MAX];
if (prompt_keyfile(hwnd, "Load private key:",
filename, 0, LOWORD(wParam)==IDC_LOAD))
- load_key_file(hwnd, state, filename,
+ load_key_file(hwnd, state, filename_from_str(filename),