This glues the GMP wrapper ENGINE into OpenSSL if it is being built (ie. if
[openssl.git] / crypto / engine / eng_int.h
index 65ba9d43a67de565a2c7bbffa0787959964fe37e..2c82861ebbb50e1c4365b1241886275809dee25b 100644 (file)
  * Hudson (tjh@cryptsoft.com).
  *
  */
+/* ====================================================================
+ * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
+ * ECDH support in OpenSSL originally developed by 
+ * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
+ */
 
 #ifndef HEADER_ENGINE_INT_H
 #define HEADER_ENGINE_INT_H
@@ -92,7 +97,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 +134,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,6 +151,8 @@ struct engine_st
        const RSA_METHOD *rsa_meth;
        const DSA_METHOD *dsa_meth;
        const DH_METHOD *dh_meth;
+       const ECDH_METHOD *ecdh_meth;
+       const ECDSA_METHOD *ecdsa_meth;
        const RAND_METHOD *rand_meth;
        /* Cipher handling is via this callback */
        ENGINE_CIPHERS_PTR ciphers;