Because there's chances we clash with the system's types.h, rename our
[openssl.git] / apps / apps.h
index 869b13d7a9d3b0a73ef8e8c1ed0d4b7054080564..07ddd4c3ad75b8b483e6b321c747ac7c26017ef5 100644 (file)
@@ -67,8 +67,8 @@
 #include <openssl/x509.h>
 #include <openssl/lhash.h>
 #include <openssl/conf.h>
-#include <openssl/engine.h>
 #include <openssl/txt_db.h>
+#include <openssl/ossl_typ.h>
 
 int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn);
 int app_RAND_write_file(const char *file, BIO *bio_e);
@@ -126,21 +126,24 @@ extern BIO *bio_err;
 #    ifdef _O_BINARY
 #      define apps_startup() \
                do { _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
-               OpenSSL_add_all_algorithms(); ENGINE_load_builtin_engines(); \
-                setup_ui_method(); } while(0)
+               ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
+               ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
 #    else
 #      define apps_startup() \
                do { _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
-               OpenSSL_add_all_algorithms(); ENGINE_load_builtin_engines(); \
-                setup_ui_method(); } while(0)
+               ERR_load_crypto_strings(); OpenSSL_add_all_algorithms(); \
+               ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
 #    endif
 #  else
 #    define apps_startup() \
                do { do_pipe_sig(); OpenSSL_add_all_algorithms(); \
-               ENGINE_load_builtin_engines(); setup_ui_method(); } while(0)
+               ERR_load_crypto_strings(); ENGINE_load_builtin_engines(); \
+               setup_ui_method(); } while(0)
 #  endif
 #  define apps_shutdown() \
-               do { destroy_ui_method(); CRYPTO_cleanup_all_ex_data(); } while(0)
+               do { destroy_ui_method(); EVP_cleanup(); \
+               ENGINE_cleanup(); CRYPTO_cleanup_all_ex_data(); \
+               ERR_remove_state(0); ERR_free_strings(); } while(0)
 #endif
 
 typedef struct args_st