Fixed Issue: Invalid ECDSA key length for valid key length (https://github.com/PowerShell/Win32-OpenSSH/issues/413)

https://github.com/PowerShell/Win32-OpenSSH/issues/413
This commit is contained in:
Manoj Ampalam 2017-01-10 22:02:46 -08:00 committed by GitHub
parent 654c18f960
commit 3508cdc624
1 changed files with 4 additions and 0 deletions

View File

@ -221,7 +221,11 @@ type_bits_valid(int type, const char *name, u_int32_t *bitsp)
fatal("Key must at least be 1024 bits"); fatal("Key must at least be 1024 bits");
else if (type == KEY_ECDSA && sshkey_ecdsa_bits_to_nid(*bitsp) == -1) else if (type == KEY_ECDSA && sshkey_ecdsa_bits_to_nid(*bitsp) == -1)
fatal("Invalid ECDSA key length - valid lengths are " fatal("Invalid ECDSA key length - valid lengths are "
#ifdef OPENSSL_HAS_NISTP521
"256, 384 or 521 bits"); "256, 384 or 521 bits");
#else
"256 or 384 bits");
#endif
#endif #endif
} }