aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-27 02:20:11 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 03:41:49 +0200
commitf42129f0c2d29435133f94f0db7c51f11cbb2a1d (patch)
treea7011c98a3062816129dc661126f1f47d726bbb6 /src
parentcrypto: prefer IS_ENABLED to ifdefs (diff)
downloadwireguard-monolithic-historical-f42129f0c2d29435133f94f0db7c51f11cbb2a1d.tar.xz
wireguard-monolithic-historical-f42129f0c2d29435133f94f0db7c51f11cbb2a1d.zip
chacha20: break out of zero loops in selftest
Diffstat (limited to 'src')
-rw-r--r--src/crypto/zinc/selftest/chacha20.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/crypto/zinc/selftest/chacha20.h b/src/crypto/zinc/selftest/chacha20.h
index 16add65..6c270c8 100644
--- a/src/crypto/zinc/selftest/chacha20.h
+++ b/src/crypto/zinc/selftest/chacha20.h
@@ -2553,6 +2553,7 @@ static bool __init chacha20_selftest(void)
pr_err("chacha20 self-test %zu (zero check): FAIL\n",
i + 1);
success = false;
+ break;
}
}
@@ -2583,6 +2584,7 @@ static bool __init chacha20_selftest(void)
pr_err("chacha20 self-test %zu (unaligned, zero check): FAIL\n",
i + 1);
success = false;
+ break;
}
}
@@ -2611,6 +2613,7 @@ static bool __init chacha20_selftest(void)
pr_err("chacha20 self-test %zu (chunked, zero check): FAIL\n",
i + 1);
success = false;
+ break;
}
}
@@ -2640,6 +2643,7 @@ next_test:
pr_err("chacha20 self-test %zu (unaligned, slide %zu, zero check): FAIL\n",
i + 1, j);
success = false;
+ break;
}
}
for (k = chacha20_testvecs[i].ilen + j;
@@ -2648,6 +2652,7 @@ next_test:
pr_err("chacha20 self-test %zu (unaligned, slide %zu, zero check): FAIL\n",
i + 1, j);
success = false;
+ break;
}
}
}