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/selftest/chacha20poly1305.h | |
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/selftest/chacha20poly1305.h')
-rw-r--r-- | src/crypto/zinc/selftest/chacha20poly1305.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/crypto/zinc/selftest/chacha20poly1305.h b/src/crypto/zinc/selftest/chacha20poly1305.h index 0510a8e..9f42252 100644 --- a/src/crypto/zinc/selftest/chacha20poly1305.h +++ b/src/crypto/zinc/selftest/chacha20poly1305.h @@ -3,7 +3,7 @@ * Copyright (C) 2015-2018 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. */ -#ifdef DEBUG +#ifdef CONFIG_ZINC_SELFTEST struct chacha20poly1305_testvec { const u8 *input, *output, *assoc, *nonce, *key; size_t ilen, alen, nlen; @@ -8889,7 +8889,7 @@ static bool __init chacha20poly1305_selftest(void) heap_src = kmalloc(MAXIMUM_TEST_BUFFER_LEN, GFP_KERNEL); computed_output = kmalloc(MAXIMUM_TEST_BUFFER_LEN, GFP_KERNEL); if (!heap_src || !computed_output) { - pr_info("chacha20poly1305 self-test malloc: FAIL\n"); + pr_err("chacha20poly1305 self-test malloc: FAIL\n"); success = false; goto out; } @@ -8908,8 +8908,8 @@ static bool __init chacha20poly1305_selftest(void) chacha20poly1305_enc_vectors[i].output, chacha20poly1305_enc_vectors[i].ilen + POLY1305_MAC_SIZE)) { - pr_info("chacha20poly1305 encryption self-test %zu: FAIL\n", - i + 1); + pr_err("chacha20poly1305 encryption self-test %zu: FAIL\n", + i + 1); success = false; } } @@ -8936,8 +8936,8 @@ static bool __init chacha20poly1305_selftest(void) chacha20poly1305_enc_vectors[i].output, chacha20poly1305_enc_vectors[i].ilen + POLY1305_MAC_SIZE)) { - pr_info("chacha20poly1305 sg encryption self-test %zu: FAIL\n", - i + 1); + pr_err("chacha20poly1305 sg encryption self-test %zu: FAIL\n", + i + 1); success = false; } } @@ -8957,8 +8957,8 @@ static bool __init chacha20poly1305_selftest(void) chacha20poly1305_dec_vectors[i].output, chacha20poly1305_dec_vectors[i].ilen - POLY1305_MAC_SIZE))) { - pr_info("chacha20poly1305 decryption self-test %zu: FAIL\n", - i + 1); + pr_err("chacha20poly1305 decryption self-test %zu: FAIL\n", + i + 1); success = false; } } @@ -8983,8 +8983,8 @@ static bool __init chacha20poly1305_selftest(void) memcmp(computed_output, chacha20poly1305_dec_vectors[i].output, chacha20poly1305_dec_vectors[i].ilen - POLY1305_MAC_SIZE))) { - pr_info("chacha20poly1305 sg decryption self-test %zu: FAIL\n", - i + 1); + pr_err("chacha20poly1305 sg decryption self-test %zu: FAIL\n", + i + 1); success = false; } } @@ -9002,8 +9002,8 @@ static bool __init chacha20poly1305_selftest(void) xchacha20poly1305_enc_vectors[i].output, xchacha20poly1305_enc_vectors[i].ilen + POLY1305_MAC_SIZE)) { - pr_info("xchacha20poly1305 encryption self-test %zu: FAIL\n", - i + 1); + pr_err("xchacha20poly1305 encryption self-test %zu: FAIL\n", + i + 1); success = false; } } @@ -9022,8 +9022,8 @@ static bool __init chacha20poly1305_selftest(void) xchacha20poly1305_dec_vectors[i].output, xchacha20poly1305_dec_vectors[i].ilen - POLY1305_MAC_SIZE))) { - pr_info("xchacha20poly1305 decryption self-test %zu: FAIL\n", - i + 1); + pr_err("xchacha20poly1305 decryption self-test %zu: FAIL\n", + i + 1); success = false; } } |