зеркало из https://github.com/Azure/sonic-openssh.git
Avoid compiler warnings
This commit is contained in:
Родитель
65165f8d83
Коммит
cf87b5b71b
28
rsa.c
28
rsa.c
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include "includes.h"
|
||||
RCSID("$Id: rsa.c,v 1.8 2000/03/05 05:10:46 damien Exp $");
|
||||
RCSID("$Id: rsa.c,v 1.9 2000/03/05 06:14:38 damien Exp $");
|
||||
|
||||
#include "rsa.h"
|
||||
#include "ssh.h"
|
||||
|
@ -44,6 +44,19 @@ RCSID("$Id: rsa.c,v 1.8 2000/03/05 05:10:46 damien Exp $");
|
|||
|
||||
int rsa_verbose = 1;
|
||||
|
||||
/*
|
||||
* Seed OpenSSL's random number generator
|
||||
*/
|
||||
void
|
||||
seed_rng()
|
||||
{
|
||||
char buf[64];
|
||||
|
||||
get_random_bytes(buf, sizeof(buf));
|
||||
RAND_seed(buf, sizeof(buf));
|
||||
memset(buf, 0, sizeof(buf));
|
||||
}
|
||||
|
||||
int
|
||||
rsa_alive()
|
||||
{
|
||||
|
@ -72,19 +85,6 @@ keygen_progress(int p, int n, void *arg)
|
|||
fflush(stdout);
|
||||
}
|
||||
|
||||
/*
|
||||
* Seed OpenSSL's random number generator
|
||||
*/
|
||||
void
|
||||
seed_rng()
|
||||
{
|
||||
char buf[64];
|
||||
|
||||
get_random_bytes(buf, sizeof(buf));
|
||||
RAND_seed(buf, sizeof(buf));
|
||||
memset(buf, 0, sizeof(buf));
|
||||
}
|
||||
|
||||
/*
|
||||
* Generates RSA public and private keys. This initializes the data
|
||||
* structures; they should be freed with rsa_clear_private_key and
|
||||
|
|
Загрузка…
Ссылка в новой задаче