summaryrefslogtreecommitdiff
path: root/source/test/unittests
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2022-12-17 23:16:55 +0100
committerMitya Selivanov <automainint@guattari.tech>2022-12-17 23:16:55 +0100
commit901478a2d04fcae70cf1f99f19b7508256633fa0 (patch)
treef4bdbbe46e66bbdd88c1de86a3d8fbd7808f5f7b /source/test/unittests
parent6f2eb1abd023c6ede47f3bc58230b0646f2e6222 (diff)
downloadkit-901478a2d04fcae70cf1f99f19b7508256633fa0.zip
Secure random fallback: thread safety
Diffstat (limited to 'source/test/unittests')
-rw-r--r--source/test/unittests/secure_random.test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/test/unittests/secure_random.test.c b/source/test/unittests/secure_random.test.c
index ec0a7b2..eadae65 100644
--- a/source/test/unittests/secure_random.test.c
+++ b/source/test/unittests/secure_random.test.c
@@ -8,9 +8,13 @@ TEST("secure random") {
int v[20];
memset(v, 0, sizeof v);
+ secure_random_init();
+
secure_random(40, v);
secure_random(40, v + 10);
+ secure_random_cleanup();
+
int repeats = 0;
for (int i = 1; i < sizeof v / sizeof *v; i++)