Make all engines available in the openssl application.
[openssl.git] / apps / apps.h
index 7a834f9d89ba66966b2369122634a6c2c448eb22..11133cb1d290f8af1856db6802eaaa1a3a2bff72 100644 (file)
@@ -67,6 +67,7 @@
 #include <openssl/x509.h>
 #include <openssl/lhash.h>
 #include <openssl/conf.h>
+#include <openssl/engine.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);
@@ -121,14 +122,16 @@ extern BIO *bio_err;
 #    ifdef _O_BINARY
 #      define apps_startup() \
                _fmode=_O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
-               SSLeay_add_all_algorithms()
+               SSLeay_add_all_algorithms(); ENGINE_load_builtin_engines()
 #    else
 #      define apps_startup() \
                _fmode=O_BINARY; do_pipe_sig(); CRYPTO_malloc_init(); \
-               SSLeay_add_all_algorithms()
+               SSLeay_add_all_algorithms(); ENGINE_load_builtin_engines()
 #    endif
 #  else
-#    define apps_startup()     do_pipe_sig(); SSLeay_add_all_algorithms();
+#    define apps_startup() \
+               do_pipe_sig(); SSLeay_add_all_algorithms(); \
+               ENGINE_load_builtin_engines()
 #  endif
 #endif
 
@@ -152,8 +155,8 @@ int set_name_ex(unsigned long *flags, const char *arg);
 int app_passwd(BIO *err, char *arg1, char *arg2, char **pass1, char **pass2);
 int add_oid_section(BIO *err, LHASH *conf);
 X509 *load_cert(BIO *err, char *file, int format);
-EVP_PKEY *load_key(BIO *err, char *file, int format, char *pass);
-EVP_PKEY *load_pubkey(BIO *err, char *file, int format);
+EVP_PKEY *load_key(BIO *err, char *file, int format, char *pass, ENGINE *e);
+EVP_PKEY *load_pubkey(BIO *err, char *file, int format, ENGINE *e);
 STACK_OF(X509) *load_certs(BIO *err, char *file, int format);
 
 #define FORMAT_UNDEF    0