removed compiler warning if HAVE_RAND_STATUS is false
This commit is contained in:
parent
5dd0a8a63e
commit
2873c18132
14
lib/ssluse.c
14
lib/ssluse.c
@ -35,6 +35,7 @@
|
|||||||
#include "formdata.h" /* for the boundary function */
|
#include "formdata.h" /* for the boundary function */
|
||||||
|
|
||||||
#ifdef USE_SSLEAY
|
#ifdef USE_SSLEAY
|
||||||
|
#include <openssl/rand.h>
|
||||||
|
|
||||||
static char global_passwd[64];
|
static char global_passwd[64];
|
||||||
|
|
||||||
@ -78,7 +79,6 @@ static
|
|||||||
int random_the_seed(struct connectdata *conn)
|
int random_the_seed(struct connectdata *conn)
|
||||||
{
|
{
|
||||||
char *buf = conn->data->buffer; /* point to the big buffer */
|
char *buf = conn->data->buffer; /* point to the big buffer */
|
||||||
int ret;
|
|
||||||
int nread=0;
|
int nread=0;
|
||||||
|
|
||||||
/* Q: should we add support for a random file name as a libcurl option?
|
/* Q: should we add support for a random file name as a libcurl option?
|
||||||
@ -106,11 +106,13 @@ int random_the_seed(struct connectdata *conn)
|
|||||||
#if defined(HAVE_RAND_EGD) && defined(EGD_SOCKET)
|
#if defined(HAVE_RAND_EGD) && defined(EGD_SOCKET)
|
||||||
/* only available in OpenSSL 0.9.5 and later */
|
/* only available in OpenSSL 0.9.5 and later */
|
||||||
/* EGD_SOCKET is set at configure time */
|
/* EGD_SOCKET is set at configure time */
|
||||||
ret = RAND_egd(EGD_SOCKET);
|
{
|
||||||
if(-1 != ret) {
|
int ret = RAND_egd(EGD_SOCKET);
|
||||||
nread += ret;
|
if(-1 != ret) {
|
||||||
if(seed_enough(conn, nread))
|
nread += ret;
|
||||||
return nread;
|
if(seed_enough(conn, nread))
|
||||||
|
return nread;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user