vpaes-[x86_64|ppc].pl: fix typo, which for some reason triggers rkhunter.
[oweals/openssl.git] / crypto / rand / rand.h
index 16ea8fca0e9c12614538a295ac72500f74df08aa..bb5520e80ac161cc498941b73dea9e3665301d10 100644 (file)
 extern "C" {
 #endif
 
-typedef struct rand_meth_st
+#if defined(OPENSSL_FIPS)
+#define FIPS_RAND_SIZE_T size_t
+#endif
+
+/* Already defined in ossl_typ.h */
+/* typedef struct rand_meth_st RAND_METHOD; */
+
+struct rand_meth_st
        {
        void (*seed)(const void *buf, int num);
        int (*bytes)(unsigned char *buf, int num);
@@ -79,7 +86,7 @@ typedef struct rand_meth_st
        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;
@@ -87,7 +94,9 @@ extern int rand_predictable;
 
 int RAND_set_rand_method(const RAND_METHOD *meth);
 const RAND_METHOD *RAND_get_rand_method(void);
+#ifndef OPENSSL_NO_ENGINE
 int RAND_set_rand_engine(ENGINE *engine);
+#endif
 RAND_METHOD *RAND_SSLeay(void);
 void RAND_cleanup(void );
 int  RAND_bytes(unsigned char *buf,int num);
@@ -103,13 +112,18 @@ int RAND_egd(const char *path);
 int RAND_egd_bytes(const char *path,int bytes);
 int RAND_poll(void);
 
-#if defined(OPENSSL_SYS_WINDOWS)
+#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
 
 void RAND_screen(void);
 int RAND_event(UINT, WPARAM, LPARAM);
 
 #endif
 
+#ifdef OPENSSL_FIPS
+void RAND_set_fips_drbg_type(int type, int flags);
+int RAND_init_fips(void);
+#endif
+
 /* 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.
@@ -120,9 +134,14 @@ void ERR_load_RAND_strings(void);
 
 /* Function codes. */
 #define RAND_F_RAND_GET_RAND_METHOD                     101
+#define RAND_F_RAND_INIT_FIPS                           102
 #define RAND_F_SSLEAY_RAND_BYTES                        100
 
 /* Reason codes. */
+#define RAND_R_DUAL_EC_DRBG_DISABLED                    104
+#define RAND_R_ERROR_INITIALISING_DRBG                  102
+#define RAND_R_ERROR_INSTANTIATING_DRBG                         103
+#define RAND_R_NO_FIPS_RANDOM_METHOD_SET                101
 #define RAND_R_PRNG_NOT_SEEDED                          100
 
 #ifdef  __cplusplus