Fix error message w/out nistp521.

Correct error message when OpenSSL doesn't support certain ECDSA key
lengths.
This commit is contained in:
Manoj Ampalam 2018-11-08 22:41:59 -08:00 committed by Darren Tucker
parent 624d19ac2d
commit 9b47b083ca
1 changed files with 4 additions and 0 deletions

View File

@ -243,7 +243,11 @@ type_bits_valid(int type, const char *name, u_int32_t *bitsp)
case KEY_ECDSA:
if (sshkey_ecdsa_bits_to_nid(*bitsp) == -1)
fatal("Invalid ECDSA key length: valid lengths are "
#ifdef OPENSSL_HAS_NISTP521
"256, 384 or 521 bits");
#else
"256 or 384 bits");
#endif
}
#endif
}