The C version of bn_sub_part_words is needed not only
[openssl.git] / crypto / engine / engine_all.c
index 28da0c6d1bf451762d8724b79436598a0c5a44f6..1d8acbf8222c522037afd315c0f959526a9778cd 100644 (file)
  *
  */
 
+#include <openssl/err.h>
 #include <openssl/engine.h>
 #include "engine_int.h"
+
 static int engine_add(ENGINE *e)
        {
        if (!ENGINE_by_id(ENGINE_get_id(e)))
+               {
+               (void)ERR_get_error();
                return ENGINE_add(e);
+               }
        return 1;
        }
 
@@ -101,6 +106,15 @@ void ENGINE_load_nuron(void)
 #endif /* !NO_HW */
        }
 
+void ENGINE_load_ubsec(void)
+       {
+#ifndef NO_HW
+#ifndef NO_HW_UBSEC
+       engine_add(ENGINE_ubsec());
+#endif /* !NO_HW_UBSEC */
+#endif /* !NO_HW */
+       }
+
 void ENGINE_load_builtin_engines(void)
        {
        static int done=0;
@@ -112,4 +126,5 @@ void ENGINE_load_builtin_engines(void)
        ENGINE_load_chil();
        ENGINE_load_atalla();
        ENGINE_load_nuron();
+       ENGINE_load_ubsec();
        }