Hide OPENSSL_INIT_SETTINGS.
[openssl.git] / include / openssl / crypto.h
index dd1089dc6c73ef2b653c67b37ecd612d32ca7add..f05fa1e18630d00a3b12a7f93916cdba7a0c86fa 100644 (file)
@@ -1,5 +1,5 @@
 /* ====================================================================
- * Copyright (c) 1998-2006 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1998-2016 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -205,7 +205,8 @@ extern "C" {
 # define CRYPTO_LOCK_COMP                38
 # define CRYPTO_LOCK_FIPS                39
 # define CRYPTO_LOCK_FIPS2               40
-# define CRYPTO_NUM_LOCKS                41
+# define CRYPTO_LOCK_INIT                41
+# define CRYPTO_NUM_LOCKS                42
 
 # define CRYPTO_LOCK             1
 # define CRYPTO_UNLOCK           2
@@ -361,6 +362,7 @@ const char *OpenSSL_version(int type);
 # define OPENSSL_BUILT_ON         2
 # define OPENSSL_PLATFORM         3
 # define OPENSSL_DIR              4
+# define OPENSSL_ENGINES_DIR      5
 
 int OPENSSL_issetugid(void);
 
@@ -573,33 +575,17 @@ int CRYPTO_memcmp(const volatile void * volatile in_a,
     OPENSSL_INIT_ENGINE_PADLOCK)
 
 
-
-/* Optional settings for initialisation */
-# define OPENSSL_INIT_SET_END                0
-# define OPENSSL_INIT_SET_CONF_FILENAME      1
-
-typedef struct ossl_init_settings_st {
-    int name;
-    union {
-        int type_int;
-        long type_long;
-        int32_t type_int32_t;
-        uint32_t type_uint32_t;
-        int64_t type_int64_t;
-        uint64_t type_uint64_t;
-        size_t type_size_t;
-        const char *type_string;
-        void *type_void_ptr;
-    } value;
-} OPENSSL_INIT_SETTINGS;
-
-typedef struct ossl_init_stop_st OPENSSL_INIT_STOP;
-
 /* Library initialisation functions */
-void OPENSSL_INIT_library_stop(void);
-void OPENSSL_INIT_crypto_library_start(uint64_t opts,
-                                       const OPENSSL_INIT_SETTINGS *settings);
-int OPENSSL_INIT_register_stop_handler(void (*handler)(void));
+void OPENSSL_cleanup(void);
+int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+int OPENSSL_atexit(void (*handler)(void));
+void OPENSSL_thread_stop(void);
+
+/* Low-level control of initialization */
+OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void);
+void OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings,
+                                      const char *config_file);
+void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings);
 
 /* BEGIN ERROR CODES */
 /*
@@ -626,6 +612,7 @@ void ERR_load_CRYPTO_strings(void);
 # define CRYPTO_F_INT_DUP_EX_DATA                         106
 # define CRYPTO_F_INT_FREE_EX_DATA                        107
 # define CRYPTO_F_INT_NEW_EX_DATA                         108
+# define CRYPTO_F_OPENSSL_INIT_CRYPTO                     116
 # define CRYPTO_F_OPENSSL_MEMDUP                          114
 
 /* Reason codes. */