This glues the GMP wrapper ENGINE into OpenSSL if it is being built (ie. if
[openssl.git] / crypto / engine / eng_all.c
index e4d48dae85445bf1f9e05982451f82dd828f33f0..64ec2db901fceafde436937d61e885ce427cb805 100644 (file)
@@ -70,44 +70,49 @@ void ENGINE_load_builtin_engines(void)
        ENGINE_load_openssl();
 #endif
        ENGINE_load_dynamic();
+#ifndef OPENSSL_NO_STATIC_ENGINE
 #ifndef OPENSSL_NO_HW
+#ifndef OPENSSL_NO_HW_4758_CCA
+       ENGINE_load_4758cca();
+#endif
+#ifndef OPENSSL_NO_HW_AEP
+       ENGINE_load_aep();
+#endif
+#ifndef OPENSSL_NO_HW_ATALLA
+       ENGINE_load_atalla();
+#endif
 #ifndef OPENSSL_NO_HW_CSWIFT
        ENGINE_load_cswift();
 #endif
 #ifndef OPENSSL_NO_HW_NCIPHER
        ENGINE_load_chil();
 #endif
-#ifndef OPENSSL_NO_HW_ATALLA
-       ENGINE_load_atalla();
-#endif
 #ifndef OPENSSL_NO_HW_NURON
        ENGINE_load_nuron();
 #endif
-#ifndef OPENSSL_NO_HW_UBSEC
-       ENGINE_load_ubsec();
-#endif
-#ifndef OPENSSL_NO_HW_AEP
-       ENGINE_load_aep();
-#endif
 #ifndef OPENSSL_NO_HW_SUREWARE
        ENGINE_load_sureware();
 #endif
-#ifndef OPENSSL_NO_HW_4758_CCA
-       ENGINE_load_4758cca();
+#ifndef OPENSSL_NO_HW_UBSEC
+       ENGINE_load_ubsec();
+#endif
 #endif
-#ifdef __OpenBSD__
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
        ENGINE_load_cryptodev();
 #endif
+#if defined(OPENSSL_USE_GMP) && !defined(OPENSSL_NO_HW_GMP)
+       ENGINE_load_gmp();
+#endif
 #endif
        }
 
-#ifdef __OpenBSD__
-void ENGINE_setup_openbsd(void) {
-       static int openbsd_default_loaded = 0;
-       if (!openbsd_default_loaded) {
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
+void ENGINE_setup_bsd_cryptodev(void) {
+       static int bsd_cryptodev_default_loaded = 0;
+       if (!bsd_cryptodev_default_loaded) {
                ENGINE_load_cryptodev();
                ENGINE_register_all_complete();
        }
-       openbsd_default_loaded=1;
+       bsd_cryptodev_default_loaded=1;
 }
 #endif