X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2Frand%2Fmd_rand.c;h=27e785d311ea8e48b166020e787b3bdbdc02ca57;hb=302d38e3f73d5fd2ba2fd30bb7798778cb9f18dd;hp=70743e116278eafe31080d3805953474d83bbc0f;hpb=0f113f3ee4d629ef9a4a30911b22b224772085e5;p=openssl.git diff --git a/crypto/rand/md_rand.c b/crypto/rand/md_rand.c index 70743e1162..27e785d311 100644 --- a/crypto/rand/md_rand.c +++ b/crypto/rand/md_rand.c @@ -121,7 +121,7 @@ #include "e_os.h" -#if !(defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYSNAME_DSPBIOS)) +#if !(defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_DSPBIOS)) # include #endif #if defined(OPENSSL_SYS_VXWORKS) @@ -173,7 +173,9 @@ static int ssleay_rand_seed(const void *buf, int num); 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 = { @@ -181,7 +183,11 @@ 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 }; @@ -383,7 +389,7 @@ static int ssleay_rand_bytes(unsigned char *buf, int num, int pseudo) #elif defined(OPENSSL_SYS_VXWORKS) struct timespec tv; clock_gettime(CLOCK_REALTIME, &ts); -#elif defined(OPENSSL_SYSNAME_DSPBIOS) +#elif defined(OPENSSL_SYS_DSPBIOS) unsigned long long tv, OPENSSL_rdtsc(); tv = OPENSSL_rdtsc(); #else @@ -601,6 +607,7 @@ static int ssleay_rand_nopseudo_bytes(unsigned char *buf, int num) return ssleay_rand_bytes(buf, num, 0); } +#ifndef OPENSSL_NO_DEPRECATED /* * pseudo-random bytes that are guaranteed to be unique but not unpredictable */ @@ -608,6 +615,7 @@ static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num) { return ssleay_rand_bytes(buf, num, 1); } +#endif static int ssleay_rand_status(void) {