libtelnet: Replace bogus use of srandomdev + random to generate "public key pair"
I'm pretty skeptical that any crypto in telnet is worth using, but if we're ostensibly generating keys, arc4random is strictly better than the previous construct.
This commit is contained in:
parent
44d780e32b
commit
23c30549af
@ -142,12 +142,7 @@ common_key(char *xsecret, char *xpublic, IdeaData *ideakey, DesData *deskey)
|
||||
static void
|
||||
getseed(char *seed, int seedsize)
|
||||
{
|
||||
int i;
|
||||
|
||||
srandomdev();
|
||||
for (i = 0; i < seedsize; i++) {
|
||||
seed[i] = random() & 0xff;
|
||||
}
|
||||
arc4random_buf(seed, seedsize);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user