19 #if defined(HAVE_YASSL)
21 #if defined(YASSL_PREFIX)
22 #define RAND_bytes yaRAND_bytes
25 #include <openssl/ssl.h>
27 #elif defined(HAVE_OPENSSL)
28 #include <openssl/rand.h>
29 #include <openssl/err.h>
51 rand_st->seed1= (rand_st->seed1*3+rand_st->seed2) % rand_st->max_value;
52 rand_st->seed2= (rand_st->seed1+rand_st->seed2+33) % rand_st->max_value;
53 return (((
double) rand_st->seed1) / rand_st->max_value_dbl);
69 #if defined(HAVE_YASSL) || defined(HAVE_OPENSSL)
73 #if defined(HAVE_YASSL)
74 rc= yaSSL::RAND_bytes((
unsigned char *) &res,
sizeof (
unsigned int));
77 return my_rnd(rand_st);
79 rc= RAND_bytes((
unsigned char *) &res,
sizeof (
unsigned int));
84 return my_rnd(rand_st);
88 return (
double)res / (double)UINT_MAX;
92 return my_rnd(rand_st);