diff options
author | Darren Tucker <dtucker@dtucker.net> | 2021-01-26 04:48:07 +0100 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2021-01-26 04:48:07 +0100 |
commit | 48d0d7a4dd31154c4208ec39029d60646192f978 (patch) | |
tree | 5f1c1fbc167c418fff1fceed416e06b0562fbe39 /defines.h | |
parent | upstream: refactor key constraint parsing in ssh-agent (diff) | |
download | openssh-48d0d7a4dd31154c4208ec39029d60646192f978.tar.xz openssh-48d0d7a4dd31154c4208ec39029d60646192f978.zip |
Disable sntrup761 if compiler doesn't support VLAs.
The sntrup761 code sourced from supercop uses variable length
arrays. Although widely supported, they are not part of the ANSI
C89 spec so if the compiler does not support VLAs, disable the
sntrup761x25519-sha512@openssh.com KEX method by replacing the kex
functions with no-op ones similar to what we do in kexecdh.c.
This should allow OpenSSH to build with a plain C89 compiler again.
Spotted by tim@, ok djm@.
Diffstat (limited to 'defines.h')
-rw-r--r-- | defines.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -894,4 +894,11 @@ struct winsize { # define USE_SYSTEM_GLOB #endif +/* + * sntrup761 uses variable length arrays, only enable if the compiler + * supports them. + */ +#ifdef VARIABLE_LENGTH_ARRAYS +# define USE_SNTRUP761X25519 1 +#endif #endif /* _DEFINES_H */ |