Deleted Added
full compact
md_rand.c (68651) md_rand.c (76866)
1/* crypto/rand/md_rand.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *

--- 468 unchanged lines hidden (view full) ---

477 return(0);
478 }
479 }
480
481/* pseudo-random bytes that are guaranteed to be unique but not
482 unpredictable */
483static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
484 {
1/* crypto/rand/md_rand.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *

--- 468 unchanged lines hidden (view full) ---

477 return(0);
478 }
479 }
480
481/* pseudo-random bytes that are guaranteed to be unique but not
482 unpredictable */
483static int ssleay_rand_pseudo_bytes(unsigned char *buf, int num)
484 {
485 int ret, err;
485 int ret;
486
487 ret = RAND_bytes(buf, num);
488 if (ret == 0)
489 {
486
487 ret = RAND_bytes(buf, num);
488 if (ret == 0)
489 {
490 err = ERR_peek_error();
490 long err = ERR_peek_error();
491 if (ERR_GET_LIB(err) == ERR_LIB_RAND &&
492 ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED)
493 (void)ERR_get_error();
494 }
495 return (ret);
496 }
497
498static int ssleay_rand_status(void)

--- 13 unchanged lines hidden ---
491 if (ERR_GET_LIB(err) == ERR_LIB_RAND &&
492 ERR_GET_REASON(err) == RAND_R_PRNG_NOT_SEEDED)
493 (void)ERR_get_error();
494 }
495 return (ret);
496 }
497
498static int ssleay_rand_status(void)

--- 13 unchanged lines hidden ---