diff options
Diffstat (limited to 'lib/accelerated/x86/aes-x86.h')
-rw-r--r-- | lib/accelerated/x86/aes-x86.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/accelerated/x86/aes-x86.h b/lib/accelerated/x86/aes-x86.h index 703521856b..2fcd890980 100644 --- a/lib/accelerated/x86/aes-x86.h +++ b/lib/accelerated/x86/aes-x86.h @@ -18,6 +18,10 @@ typedef struct { uint32_t rounds; } AES_KEY; +#define CHECK_AES_KEYSIZE(s) \ + if (s != 16 && s != 24 && s != 32) \ + return GNUTLS_E_INVALID_REQUEST + void aesni_ecb_encrypt(const unsigned char *in, unsigned char *out, size_t len, const AES_KEY * key, int enc); |