asn1 check-der use roken
Rely on roken to determine which random function should be used. Rename parameter "rand" to "randbytes" to avoid collision with functions named "rand()". Change-Id: Ic07cf149daef1cd568b58277773fbe27aef04f7b
This commit is contained in:
@@ -1099,14 +1099,10 @@ struct randomcheck {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
asn1rand(uint8_t *rand, size_t len)
|
asn1rand(uint8_t *randbytes, size_t len)
|
||||||
{
|
{
|
||||||
while (len) {
|
while (len) {
|
||||||
#ifdef HAVE_ARC4RANDOM
|
*randbytes++ = rk_random();
|
||||||
*rand++ = arc4random();
|
|
||||||
#else
|
|
||||||
*rand++ = random();
|
|
||||||
#endif
|
|
||||||
len--;
|
len--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user