Make sure we get the definition of OPENSSL_NO_AES.
[openssl.git] / crypto / evp / evp_test.c
index 22006d90926530772844263596b279603ab26011..28460173f7ef0a2220ddb31f150948b7e25b4ba2 100644 (file)
 #include "../e_os.h"
 
 #include <openssl/evp.h>
+#ifndef OPENSSL_NO_ENGINE
 #include <openssl/engine.h>
+#endif
+#include <openssl/err.h>
 #include <openssl/conf.h>
 
 static void hexdump(FILE *f,const char *title,const unsigned char *s,int l)
@@ -126,6 +129,7 @@ static unsigned char *ustrsep(char **p,const char *sep)
 static int test1_exit(int ec)
        {
        EXIT(ec);
+       return(0);              /* To keep some compilers quiet */
        }
 
 static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn,
@@ -329,11 +333,14 @@ int main(int argc,char **argv)
     /* Load up the software EVP_CIPHER and EVP_MD definitions */
     OpenSSL_add_all_ciphers();
     OpenSSL_add_all_digests();
+#ifndef OPENSSL_NO_ENGINE
     /* Load all compiled-in ENGINEs */
     ENGINE_load_builtin_engines();
+#endif
 #if 0
     OPENSSL_config();
 #endif
+#ifndef OPENSSL_NO_ENGINE
     /* Register all available ENGINE implementations of ciphers and digests.
      * This could perhaps be changed to "ENGINE_register_all_complete()"? */
     ENGINE_register_all_ciphers();
@@ -342,6 +349,7 @@ int main(int argc,char **argv)
      * It'll prevent ENGINEs being ENGINE_init()ialised for cipher/digest use if
      * they weren't already initialised. */
     /* ENGINE_set_cipher_flags(ENGINE_CIPHER_FLAG_NOINIT); */
+#endif
 
     for( ; ; )
        {
@@ -383,7 +391,9 @@ int main(int argc,char **argv)
            }
        }
 
+#ifndef OPENSSL_NO_ENGINE
     ENGINE_cleanup();
+#endif
     EVP_cleanup();
     CRYPTO_cleanup_all_ex_data();
     ERR_remove_state(0);