aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-06-21 22:48:22 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-06-22 04:09:39 +0200
commitfd8dfd33f0376b7b4f638d141e6d1643bd5b14c2 (patch)
tree0c4d78c5a5d6522c15d705908673a40217114142
parentreceive: don't toggle bh (diff)
downloadwireguard-monolithic-historical-fd8dfd33f0376b7b4f638d141e6d1643bd5b14c2.tar.xz
wireguard-monolithic-historical-fd8dfd33f0376b7b4f638d141e6d1643bd5b14c2.zip
main: test poly1305 before chacha20poly1305
Since chacha20poly1305 relies on the correctness of poly1305, it's useful to have a failing poly1305 test first, to better pinpoint what's happening.
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index f1db64b..a4f707d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -30,7 +30,7 @@ static int __init mod_init(void)
blake2s_fpu_init();
curve25519_fpu_init();
#ifdef DEBUG
- if (!allowedips_selftest() || !packet_counter_selftest() || !curve25519_selftest() || !chacha20poly1305_selftest() || !poly1305_selftest() || !blake2s_selftest() || !ratelimiter_selftest())
+ if (!allowedips_selftest() || !packet_counter_selftest() || !curve25519_selftest() || !poly1305_selftest() || !chacha20poly1305_selftest() || !blake2s_selftest() || !ratelimiter_selftest())
return -ENOTRECOVERABLE;
#endif
noise_init();