Changes between 1.0.2 and 1.1.0 [xx XXX xxxx]
+ *) RAND_pseudo_bytes has been deprecated. Users should use RAND bytes instead.
+
*) Added support for TLS extended master secret from
draft-ietf-tls-session-hash-03.txt. Thanks for Alfredo Pironti for an
initial patch which was a great help during development.
static int ssleay_rand_add(const void *buf, int num, double add_entropy);
static int ssleay_rand_bytes(unsigned char *buf, int num, int pseudo);
static int ssleay_rand_nopseudo_bytes(unsigned char *buf, int num);
+#ifndef OPENSSL_NO_DEPRECATED
static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num);
+#endif
static int ssleay_rand_status(void);
static RAND_METHOD rand_ssleay_meth = {
ssleay_rand_nopseudo_bytes,
ssleay_rand_cleanup,
ssleay_rand_add,
+#ifndef OPENSSL_NO_DEPRECATED
ssleay_rand_pseudo_bytes,
+#else
+ NULL,
+#endif
ssleay_rand_status
};
return ssleay_rand_bytes(buf, num, 0);
}
+#ifndef OPENSSL_NO_DEPRECATED
/*
* pseudo-random bytes that are guaranteed to be unique but not unpredictable
*/
{
return ssleay_rand_bytes(buf, num, 1);
}
+#endif
static int ssleay_rand_status(void)
{
RAND_METHOD *RAND_SSLeay(void);
void RAND_cleanup(void);
int RAND_bytes(unsigned char *buf, int num);
-int RAND_pseudo_bytes(unsigned char *buf, int num);
+#ifdef OPENSSL_USE_DEPRECATED
+DECLARE_DEPRECATED(int RAND_pseudo_bytes(unsigned char *buf, int num));
+#endif
void RAND_seed(const void *buf, int num);
void RAND_add(const void *buf, int num, double entropy);
int RAND_load_file(const char *file, long max_bytes);
return (-1);
}
+#ifndef OPENSSL_NO_DEPRECATED
int RAND_pseudo_bytes(unsigned char *buf, int num)
{
const RAND_METHOD *meth = RAND_get_rand_method();
return meth->pseudorand(buf, num);
return (-1);
}
+#endif
int RAND_status(void)
{
int RAND_bytes(unsigned char *buf, int num);
+Deprecated:
+
int RAND_pseudo_bytes(unsigned char *buf, int num);
=head1 DESCRIPTION
into B<buf>. An error occurs if the PRNG has not been seeded with
enough randomness to ensure an unpredictable byte sequence.
+RAND_pseudo_bytes() has been deprecated. Users should use RAND_bytes() instead.
RAND_pseudo_bytes() puts B<num> pseudo-random bytes into B<buf>.
Pseudo-random byte sequences generated by RAND_pseudo_bytes() will be
unique if they are of sufficient length, but are not necessarily