- Fix Weak Entropy Used For Nettle,

reported by X41 D-Sec.
This commit is contained in:
W.C.A. Wijngaards
2019-11-20 11:28:53 +01:00
parent 7e3da817c3
commit d8809c672a
8 changed files with 15 additions and 42 deletions
+1 -3
View File
@@ -538,10 +538,8 @@ rnd_test(void)
struct ub_randstate* r;
int num = 1000, i;
long int a[1000];
unsigned int seed = (unsigned)time(NULL);
unit_show_feature("ub_random");
printf("ub_random seed is %u\n", seed);
unit_assert( (r = ub_initstate(seed, NULL)) );
unit_assert( (r = ub_initstate(NULL)) );
for(i=0; i<num; i++) {
a[i] = ub_random(r);
unit_assert(a[i] >= 0);