diff options
Diffstat (limited to 'include/libssh/chacha.h')
-rw-r--r-- | include/libssh/chacha.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/libssh/chacha.h b/include/libssh/chacha.h index 84ff66a2..bac78c67 100644 --- a/include/libssh/chacha.h +++ b/include/libssh/chacha.h @@ -20,13 +20,22 @@ struct chacha_ctx { #define CHACHA_BLOCKLEN 64 void chacha_keysetup(struct chacha_ctx *x, const uint8_t *k, uint32_t kbits) - __attribute__((__bounded__(__minbytes__, 2, CHACHA_MINKEYLEN))); +#ifdef HAVE_GCC_BOUNDED_ATTRIBUTE + __attribute__((__bounded__(__minbytes__, 2, CHACHA_MINKEYLEN))) +#endif + ; void chacha_ivsetup(struct chacha_ctx *x, const uint8_t *iv, const uint8_t *ctr) +#ifdef HAVE_GCC_BOUNDED_ATTRIBUTE __attribute__((__bounded__(__minbytes__, 2, CHACHA_NONCELEN))) - __attribute__((__bounded__(__minbytes__, 3, CHACHA_CTRLEN))); + __attribute__((__bounded__(__minbytes__, 3, CHACHA_CTRLEN))) +#endif + ; void chacha_encrypt_bytes(struct chacha_ctx *x, const uint8_t *m, uint8_t *c, uint32_t bytes) +#ifdef HAVE_GCC_BOUNDED_ATTRIBUTE __attribute__((__bounded__(__buffer__, 2, 4))) - __attribute__((__bounded__(__buffer__, 3, 4))); + __attribute__((__bounded__(__buffer__, 3, 4))) +#endif + ; #endif /* CHACHA_H */ |