Skip to content
Snippets Groups Projects
Commit d4e18e41 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

Adjusted to run properly with OpenSSL 0.9.5.

parent cc80e5b5
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,7 @@
#include "urldata.h"
#include "sendf.h"
#include "formdata.h" /* for the boundary function */
#ifdef USE_SSLEAY
......@@ -162,6 +163,29 @@ UrgSSLConnect (struct UrlData *data)
/* Lets get nice error messages */
SSL_load_error_strings();
#ifdef HAVE_RAND_STATUS
/* RAND_status() was introduced in OpenSSL 0.9.5 */
if(0 == RAND_status())
#endif
{
/* We need to seed the PRNG properly! */
#ifdef WIN32
/* This one gets a random value by reading the currently shown screen */
RAND_screen();
#else
int len;
char *area = MakeFormBoundary();
if(!area)
return 3; /* out of memory */
len = strlen(area);
RAND_seed(area, len);
free(area); /* now remove the random junk */
#endif
}
/* Setup all the global SSL stuff */
SSLeay_add_ssl_algorithms();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment