X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Frand%2Frand.h;h=2973ee90e44100742501a3af401863b0e9c1329b;hb=a6aa71ff5f321d762c31da4caca31e375842653b;hp=fd8ee38366f0b9df32b2c543ebe0d3023acb3c40;hpb=a9be3af5ad4836f7e50f0546311ca90c717b861e;p=oweals%2Fopenssl.git diff --git a/crypto/rand/rand.h b/crypto/rand/rand.h index fd8ee38366..2973ee90e4 100644 --- a/crypto/rand/rand.h +++ b/crypto/rand/rand.h @@ -66,24 +66,52 @@ extern "C" { typedef struct rand_meth_st { void (*seed)(const void *buf, int num); - void (*bytes)(unsigned char *buf, int num); + int (*bytes)(unsigned char *buf, int num); void (*cleanup)(void); + void (*add)(const void *buf, int num, double entropy); + int (*pseudorand)(unsigned char *buf, int num); + int (*status)(void); } RAND_METHOD; +#ifdef BN_DEBUG +extern int rand_predictable; +#endif + void RAND_set_rand_method(RAND_METHOD *meth); RAND_METHOD *RAND_get_rand_method(void ); RAND_METHOD *RAND_SSLeay(void); void RAND_cleanup(void ); -void RAND_bytes(unsigned char *buf,int num); +int RAND_bytes(unsigned char *buf,int num); +int RAND_pseudo_bytes(unsigned char *buf,int num); 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); int RAND_write_file(const char *file); -char *RAND_file_name(char *file,int num); -#ifdef WINDOWS +const char *RAND_file_name(char *file,int num); +int RAND_status(void); +int RAND_egd(const char *path); +#if defined(WINDOWS) || defined(WIN32) +#include void RAND_screen(void); +int RAND_event(UINT, WPARAM, LPARAM); #endif +void ERR_load_RAND_strings(void); + +/* BEGIN ERROR CODES */ +/* The following lines are auto generated by the script mkerr.pl. Any changes + * made after this point may be overwritten when the script is next run. + */ + +/* Error codes for the RAND functions. */ + +/* Function codes. */ +#define RAND_F_SSLEAY_RAND_BYTES 100 + +/* Reason codes. */ +#define RAND_R_PRNG_NOT_SEEDED 100 + #ifdef __cplusplus } #endif - #endif +