OPENSSL_SYS_WIN32 is important so util/mkdef.pl can detect it
[openssl.git] / crypto / rand / rand.h
index 5d85741452ad464bda0de9450caa91860667105d..66e39991ec75248ab35298efeb5fdcadd5d2cf09 100644 (file)
 #define HEADER_RAND_H
 
 #include <stdlib.h>
+#include <openssl/ossl_typ.h>
+#include <openssl/e_os2.h>
+
+#if defined(OPENSSL_SYS_WINDOWS)
+#include <windows.h>
+#endif
 
 #ifdef  __cplusplus
 extern "C" {
@@ -79,10 +85,9 @@ typedef struct rand_meth_st
 extern int rand_predictable;
 #endif
 
-struct engine_st;
-
-int RAND_set_rand_method(struct engine_st *meth);
-RAND_METHOD *RAND_get_rand_method(void );
+int RAND_set_rand_method(const RAND_METHOD *meth);
+const RAND_METHOD *RAND_get_rand_method(void);
+int RAND_set_rand_engine(ENGINE *engine);
 RAND_METHOD *RAND_SSLeay(void);
 void RAND_cleanup(void );
 int  RAND_bytes(unsigned char *buf,int num);
@@ -96,7 +101,6 @@ int RAND_status(void);
 int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes);
 int RAND_egd(const char *path);
 int RAND_egd_bytes(const char *path,int bytes);
-void ERR_load_RAND_strings(void);
 int RAND_poll(void);
 
 #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
@@ -110,10 +114,12 @@ int RAND_event(UINT, WPARAM, LPARAM);
 /* 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.
  */
+void ERR_load_RAND_strings(void);
 
 /* Error codes for the RAND functions. */
 
 /* Function codes. */
+#define RAND_F_RAND_GET_RAND_METHOD                     101
 #define RAND_F_SSLEAY_RAND_BYTES                        100
 
 /* Reason codes. */
@@ -123,4 +129,3 @@ int RAND_event(UINT, WPARAM, LPARAM);
 }
 #endif
 #endif
-