X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/3b4c589946c888bfee8bc84a75dd3a8cd249396c..b4453f4964de4b98d42e38df8a8848b1c63e10e9:/puttygen.c?ds=inline diff --git a/puttygen.c b/puttygen.c index 8ce44b4a..ac5079e0 100644 --- a/puttygen.c +++ b/puttygen.c @@ -314,7 +314,7 @@ static void setupbigedit1(HWND hwnd, int id, struct RSAKey *key) { buffer = smalloc(strlen(dec1)+strlen(dec2)+ strlen(key->comment)+30); sprintf(buffer, "%d %s %s %s", - ssh1_bignum_bitcount(key->modulus), + bignum_bitcount(key->modulus), dec1, dec2, key->comment); SetDlgItemText(hwnd, id, buffer); sfree(dec1); @@ -325,7 +325,7 @@ static void setupbigedit1(HWND hwnd, int id, struct RSAKey *key) { static void setupbigedit2(HWND hwnd, int id, struct ssh2_userkey *key) { unsigned char *pub_blob; char *buffer, *p; - int pub_len, buflen; + int pub_len; int i; pub_blob = key->alg->public_blob(key->data, &pub_len); @@ -530,8 +530,13 @@ static int CALLBACK MainDlgProc (HWND hwnd, UINT msg, sfree(*state->commentptr); *state->commentptr = smalloc(len+1); GetWindowText(editctl, *state->commentptr, len+1); - } - } + if (state->ssh2) { + setupbigedit2(hwnd, IDC_KEYDISPLAY, &state->ssh2key); + } else { + setupbigedit1(hwnd, IDC_KEYDISPLAY, &state->key); + } + } + } break; case IDC_ABOUT: EnableWindow(hwnd, 0);