* include/grub/crypto.h: Add maximums on hash size and cipher block

size.
This commit is contained in:
Vladimir Serbinenko 2013-11-12 01:20:45 +01:00
parent 44a387e0ea
commit 5ccaf90415
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2013-11-12 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/crypto.h: Add maximums on hash size and cipher block
size.
2013-11-12 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-12 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/commands/xnu_uuid.c: Remove variable length arrays. * grub-core/commands/xnu_uuid.c: Remove variable length arrays.

View file

@ -85,6 +85,10 @@ enum gcry_cipher_modes
}; };
#endif #endif
/* Don't rely on this. Check! */
#define GRUB_CRYPTO_MAX_MDLEN 64
#define GRUB_CRYPTO_MAX_CIPHER_BLOCKSIZE 16
/* Type for the cipher_setkey function. */ /* Type for the cipher_setkey function. */
typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c, typedef gcry_err_code_t (*gcry_cipher_setkey_t) (void *c,
const unsigned char *key, const unsigned char *key,