diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-25 23:01:32 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-25 23:26:35 +0200 |
commit | a91f2d36b5819c4f76d513ffbc5e3344b796b5f4 (patch) | |
tree | 2ee1a93cbf73a915570f5d5c703c53a6e4e315ca /src/crypto/zinc/blake2s | |
parent | poly1305-arm: swap endianness in base 2^26 conversion (diff) | |
download | wireguard-monolithic-historical-a91f2d36b5819c4f76d513ffbc5e3344b796b5f4.tar.xz wireguard-monolithic-historical-a91f2d36b5819c4f76d513ffbc5e3344b796b5f4.zip |
crypto: rename DEBUG to SELFTEST
Also we make selftest errors of type err, so that they're obvious in
dmesg.
Diffstat (limited to 'src/crypto/zinc/blake2s')
-rw-r--r-- | src/crypto/zinc/blake2s/blake2s.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/crypto/zinc/blake2s/blake2s.c b/src/crypto/zinc/blake2s/blake2s.c index 5ce74c1..bd7146b 100644 --- a/src/crypto/zinc/blake2s/blake2s.c +++ b/src/crypto/zinc/blake2s/blake2s.c @@ -86,7 +86,7 @@ void blake2s_init(struct blake2s_state *state, const size_t outlen) .depth = 1 }; -#ifdef DEBUG +#ifdef CONFIG_ZINC_SELFTEST BUG_ON(!outlen || outlen > BLAKE2S_HASH_SIZE); #endif blake2s_init_param(state, ¶m); @@ -102,7 +102,7 @@ void blake2s_init_key(struct blake2s_state *state, const size_t outlen, .depth = 1 }; u8 block[BLAKE2S_BLOCK_SIZE] = { 0 }; -#ifdef DEBUG +#ifdef CONFIG_ZINC_SELFTEST BUG_ON(!outlen || outlen > BLAKE2S_HASH_SIZE || !key || !keylen || keylen > BLAKE2S_KEY_SIZE); #endif @@ -135,7 +135,7 @@ static inline void blake2s_compress(struct blake2s_state *state, u32 v[16]; int i; -#ifdef DEBUG +#ifdef CONFIG_ZINC_SELFTEST BUG_ON(nblocks > 1 && inc != BLAKE2S_BLOCK_SIZE); #endif @@ -232,7 +232,7 @@ EXPORT_SYMBOL(blake2s_update); void blake2s_final(struct blake2s_state *state, u8 *out, const size_t outlen) { -#ifdef DEBUG +#ifdef CONFIG_ZINC_SELFTEST BUG_ON(!out || !outlen || outlen > BLAKE2S_HASH_SIZE); #endif blake2s_set_lastblock(state); @@ -294,7 +294,7 @@ static int __init mod_init(void) { if (!nosimd) blake2s_fpu_init(); -#ifdef DEBUG +#ifdef CONFIG_ZINC_SELFTEST if (!blake2s_selftest()) return -ENOTRECOVERABLE; #endif |