+ BOOL ok;
+ state->keysize = GetDlgItemInt(hwnd, IDC_BITS,
+ &ok, FALSE);
+ if (!ok) state->keysize = DEFAULT_KEYSIZE;
+ if (state->keysize < 256) {
+ int ret = MessageBox(hwnd,
+ "PuTTYgen will not generate a key"
+ " smaller than 256 bits.\n"
+ "Key length reset to 256. Continue?",
+ "PuTTYgen Warning",
+ MB_ICONWARNING | MB_OKCANCEL);
+ if (ret != IDOK)
+ break;
+ state->keysize = 256;
+ SetDlgItemInt(hwnd, IDC_BITS, 256, FALSE);
+ }