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/curve25519.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/curve25519.h')
-rw-r--r-- | src/crypto/zinc/selftest/curve25519.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/zinc/selftest/curve25519.h b/src/crypto/zinc/selftest/curve25519.h index f529b7b..8ea9f92 100644 --- a/src/crypto/zinc/selftest/curve25519.h +++ b/src/crypto/zinc/selftest/curve25519.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 curve25519_test_vector { u8 private[CURVE25519_KEY_SIZE]; u8 public[CURVE25519_KEY_SIZE]; @@ -1293,7 +1293,7 @@ static bool __init curve25519_selftest(void) if (ret != curve25519_test_vectors[i].valid || memcmp(out, curve25519_test_vectors[i].result, CURVE25519_KEY_SIZE)) { - pr_info("curve25519 self-test %zu: FAIL\n", i + 1); + pr_err("curve25519 self-test %zu: FAIL\n", i + 1); success = false; } } @@ -1303,8 +1303,8 @@ static bool __init curve25519_selftest(void) ret = curve25519_generate_public(out, in); ret2 = curve25519(out2, in, (u8[CURVE25519_KEY_SIZE]){ 9 }); if (ret != ret2 || memcmp(out, out2, CURVE25519_KEY_SIZE)) { - pr_info("curve25519 basepoint self-test %zu: FAIL: input - 0x", - i + 1); + pr_err("curve25519 basepoint self-test %zu: FAIL: input - 0x", + i + 1); for (j = CURVE25519_KEY_SIZE; j-- > 0;) printk(KERN_CONT "%02x", in[j]); printk(KERN_CONT "\n"); |