ECDSA support
[openssl.git] / crypto / engine / eng_int.h
index e07da813b68d7385040c2038e65bf71e815a4bf7..0407de9e1adc148ee8da64175dde44132b4c9fe1 100644 (file)
@@ -92,7 +92,11 @@ extern "C" {
  * order. NB: both the "add" functions assume CRYPTO_LOCK_ENGINE to already be
  * held (in "write" mode). */
 typedef void (ENGINE_CLEANUP_CB)(void);
-DECLARE_STACK_OF(ENGINE_CLEANUP_CB)
+typedef struct st_engine_cleanup_item
+       {
+       ENGINE_CLEANUP_CB *cb;
+       } ENGINE_CLEANUP_ITEM;
+DECLARE_STACK_OF(ENGINE_CLEANUP_ITEM)
 void engine_cleanup_add_first(ENGINE_CLEANUP_CB *cb);
 void engine_cleanup_add_last(ENGINE_CLEANUP_CB *cb);
 
@@ -125,6 +129,11 @@ int engine_unlocked_init(ENGINE *e);
 int engine_unlocked_finish(ENGINE *e, int unlock_for_handlers);
 int engine_free_util(ENGINE *e, int locked);
 
+/* This function will reset all "set"able values in an ENGINE to NULL. This
+ * won't touch reference counts or ex_data, but is equivalent to calling all the
+ * ENGINE_set_***() functions with a NULL value. */
+void engine_set_all_null(ENGINE *e);
+
 /* NB: Bitwise OR-able values for the "flags" variable in ENGINE are now exposed
  * in engine.h. */
 
@@ -137,7 +146,13 @@ struct engine_st
        const RSA_METHOD *rsa_meth;
        const DSA_METHOD *dsa_meth;
        const DH_METHOD *dh_meth;
+       const ECDSA_METHOD *ecdsa_meth;
        const RAND_METHOD *rand_meth;
+       /* Cipher handling is via this callback */
+       ENGINE_CIPHERS_PTR ciphers;
+       /* Digest handling is via this callback */
+       ENGINE_DIGESTS_PTR digests;
+
 
        ENGINE_GEN_INT_FUNC_PTR destroy;
 
@@ -157,7 +172,7 @@ struct engine_st
         * simply to cope with (de)allocation of this structure. Hence,
         * running_ref <= struct_ref at all times. */
        int funct_ref;
-       /* A place to store per-key data */
+       /* A place to store per-ENGINE data */
        CRYPTO_EX_DATA ex_data;
        /* Used to maintain the linked-list of engines. */
        struct engine_st *prev;