As with RSA, which was modified recently, this change makes it possible to
[openssl.git] / engines / e_atalla.c
index 6151c469024b0698f7c63878e08c109b469c7661..64dcc046e89f151f836313ab87ec6c19f50a4d03 100644 (file)
@@ -57,8 +57,9 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 #include <openssl/crypto.h>
-#include "cryptlib.h"
+#include <openssl/buffer.h>
 #include <openssl/dso.h>
 #include <openssl/engine.h>
 
@@ -72,7 +73,7 @@
 #endif
 
 #define ATALLA_LIB_NAME "atalla engine"
-#include "hw_atalla_err.c"
+#include "e_atalla_err.c"
 
 static int atalla_destroy(ENGINE *e);
 static int atalla_init(ENGINE *e);
@@ -135,6 +136,7 @@ static RSA_METHOD atalla_rsa =
        0,
        NULL,
        NULL,
+       NULL,
        NULL
        };
 #endif
@@ -152,7 +154,9 @@ static DSA_METHOD atalla_dsa =
        NULL, /* init */
        NULL, /* finish */
        0, /* flags */
-       NULL /* app_data */
+       NULL, /* app_data */
+       NULL, /* dsa_paramgen */
+       NULL /* dsa_keygen */
        };
 #endif
 
@@ -167,6 +171,7 @@ static DH_METHOD atalla_dh =
        NULL,
        NULL,
        0,
+       NULL,
        NULL
        };
 #endif
@@ -242,6 +247,7 @@ static int bind_helper(ENGINE *e)
        return 1;
        }
 
+#ifdef OPENSSL_NO_DYNAMIC_ENGINE
 static ENGINE *engine_atalla(void)
        {
        ENGINE *ret = ENGINE_new();
@@ -264,6 +270,7 @@ void ENGINE_load_atalla(void)
        ENGINE_free(toadd);
        ERR_clear_error();
        }
+#endif
 
 /* This is a process-global DSO handle used for loading and unloading
  * the Atalla library. NB: This is only set (or unset) during an
@@ -575,7 +582,7 @@ static int atalla_mod_exp_dh(const DH *dh, BIGNUM *r,
 
 /* This stuff is needed if this ENGINE is being compiled into a self-contained
  * shared-library. */
-#ifdef ENGINE_DYNAMIC_SUPPORT
+#ifndef OPENSSL_NO_DYNAMIC_ENGINE
 static int bind_fn(ENGINE *e, const char *id)
        {
        if(id && (strcmp(id, engine_atalla_id) != 0))
@@ -586,7 +593,7 @@ static int bind_fn(ENGINE *e, const char *id)
        }
 IMPLEMENT_DYNAMIC_CHECK_FN()
 IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
-#endif /* ENGINE_DYNAMIC_SUPPORT */
+#endif /* OPENSSL_NO_DYNAMIC_ENGINE */
 
 #endif /* !OPENSSL_NO_HW_ATALLA */
 #endif /* !OPENSSL_NO_HW */