Wipe (some) secrets from memory after use
[tinc] / test / unit / test_random_noinit.c
1 // Test that randomize() kills the process when called without initialization
2
3 #include "unittest.h"
4
5 #ifdef HAVE_GETRANDOM
6 int main(void) {
7         return 1;
8 }
9 #else
10 #include "../../src/random.h"
11
12 int main(void) {
13         uint8_t buf[16];
14         randomize(buf, sizeof(buf));
15         return 0;
16 }
17 #endif // HAVE_GETRANDOM