summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2020-11-09 00:33:35 +1100
committerDarren Tucker <dtucker@dtucker.net>2020-11-09 00:33:35 +1100
commit292bcb2479deb27204e3ff796539c003975a5f7a (patch)
treee74aaba8c0702e34c687827707fa92b6d7e7b739 /ssh-keygen.c
parent71693251b7cbb7dd89aaac18815147124732d0d3 (diff)
downloadopenssh-git-292bcb2479deb27204e3ff796539c003975a5f7a.tar.gz
Remove preprocessor directive from log macro calls.
Preprocessor directives inside macro calls, such as the new log macros, are undefined behaviour and do not work with, eg old GCCs. Put the entire log call inside the ifdef for OPENSSL_HAS_NISTP521.
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 303faee3..23d273a9 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -219,10 +219,11 @@ type_bits_valid(int type, const char *name, u_int32_t *bitsp)
break;
case KEY_ECDSA:
if (sshkey_ecdsa_bits_to_nid(*bitsp) == -1)
- fatal("Invalid ECDSA key length: valid lengths are "
#ifdef OPENSSL_HAS_NISTP521
+ fatal("Invalid ECDSA key length: valid lengths are "
"256, 384 or 521 bits");
#else
+ fatal("Invalid ECDSA key length: valid lengths are "
"256 or 384 bits");
#endif
}