| 4197 |
EnableWindow(GetDlgItem(dlg, IDC_ECDSA256_TYPE), TRUE); |
EnableWindow(GetDlgItem(dlg, IDC_ECDSA256_TYPE), TRUE); |
| 4198 |
EnableWindow(GetDlgItem(dlg, IDC_ECDSA384_TYPE), TRUE); |
EnableWindow(GetDlgItem(dlg, IDC_ECDSA384_TYPE), TRUE); |
| 4199 |
EnableWindow(GetDlgItem(dlg, IDC_ECDSA521_TYPE), TRUE); |
EnableWindow(GetDlgItem(dlg, IDC_ECDSA521_TYPE), TRUE); |
| 4200 |
if (!isECDSAkey(key_type)) { |
if (!isFixedLengthKey(key_type)) { |
| 4201 |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), TRUE); |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), TRUE); |
| 4202 |
} |
} |
| 4203 |
EnableWindow(GetDlgItem(dlg, IDOK), TRUE); |
EnableWindow(GetDlgItem(dlg, IDOK), TRUE); |
| 4220 |
|
|
| 4221 |
// if radio button pressed... |
// if radio button pressed... |
| 4222 |
case IDC_RSA1_TYPE | (BN_CLICKED << 16): |
case IDC_RSA1_TYPE | (BN_CLICKED << 16): |
| 4223 |
if (isECDSAkey(key_type)) { |
if (isFixedLengthKey(key_type)) { |
| 4224 |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), TRUE); |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), TRUE); |
| 4225 |
SetDlgItemInt(dlg, IDC_KEYBITS, saved_key_bits, FALSE); |
SetDlgItemInt(dlg, IDC_KEYBITS, saved_key_bits, FALSE); |
| 4226 |
} |
} |
| 4228 |
break; |
break; |
| 4229 |
|
|
| 4230 |
case IDC_RSA_TYPE | (BN_CLICKED << 16): |
case IDC_RSA_TYPE | (BN_CLICKED << 16): |
| 4231 |
if (isECDSAkey(key_type)) { |
if (isFixedLengthKey(key_type)) { |
| 4232 |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), TRUE); |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), TRUE); |
| 4233 |
SetDlgItemInt(dlg, IDC_KEYBITS, saved_key_bits, FALSE); |
SetDlgItemInt(dlg, IDC_KEYBITS, saved_key_bits, FALSE); |
| 4234 |
} |
} |
| 4236 |
break; |
break; |
| 4237 |
|
|
| 4238 |
case IDC_DSA_TYPE | (BN_CLICKED << 16): |
case IDC_DSA_TYPE | (BN_CLICKED << 16): |
| 4239 |
if (isECDSAkey(key_type)) { |
if (!isFixedLengthKey(key_type)) { |
| 4240 |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), TRUE); |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), FALSE); |
| 4241 |
SetDlgItemInt(dlg, IDC_KEYBITS, saved_key_bits, FALSE); |
saved_key_bits = GetDlgItemInt(dlg, IDC_KEYBITS, NULL, FALSE); |
| 4242 |
} |
} |
| 4243 |
key_type = KEY_DSA; |
key_type = KEY_DSA; |
| 4244 |
|
SetDlgItemInt(dlg, IDC_KEYBITS, 1024, FALSE); |
| 4245 |
break; |
break; |
| 4246 |
|
|
| 4247 |
case IDC_ECDSA256_TYPE | (BN_CLICKED << 16): |
case IDC_ECDSA256_TYPE | (BN_CLICKED << 16): |
| 4248 |
if (!isECDSAkey(key_type)) { |
if (!isFixedLengthKey(key_type)) { |
| 4249 |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), FALSE); |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), FALSE); |
| 4250 |
saved_key_bits = GetDlgItemInt(dlg, IDC_KEYBITS, NULL, FALSE); |
saved_key_bits = GetDlgItemInt(dlg, IDC_KEYBITS, NULL, FALSE); |
| 4251 |
} |
} |
| 4254 |
break; |
break; |
| 4255 |
|
|
| 4256 |
case IDC_ECDSA384_TYPE | (BN_CLICKED << 16): |
case IDC_ECDSA384_TYPE | (BN_CLICKED << 16): |
| 4257 |
if (!isECDSAkey(key_type)) { |
if (!isFixedLengthKey(key_type)) { |
| 4258 |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), FALSE); |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), FALSE); |
| 4259 |
saved_key_bits = GetDlgItemInt(dlg, IDC_KEYBITS, NULL, FALSE); |
saved_key_bits = GetDlgItemInt(dlg, IDC_KEYBITS, NULL, FALSE); |
| 4260 |
} |
} |
| 4263 |
break; |
break; |
| 4264 |
|
|
| 4265 |
case IDC_ECDSA521_TYPE | (BN_CLICKED << 16): |
case IDC_ECDSA521_TYPE | (BN_CLICKED << 16): |
| 4266 |
if (!isECDSAkey(key_type)) { |
if (!isFixedLengthKey(key_type)) { |
| 4267 |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), FALSE); |
EnableWindow(GetDlgItem(dlg, IDC_KEYBITS), FALSE); |
| 4268 |
saved_key_bits = GetDlgItemInt(dlg, IDC_KEYBITS, NULL, FALSE); |
saved_key_bits = GetDlgItemInt(dlg, IDC_KEYBITS, NULL, FALSE); |
| 4269 |
} |
} |