Add first cut symmetric crypto support.
[openssl.git] / crypto / engine / engine_int.h
index 54cfe47af70f6320204f5700445898d87498cc02..126fef746e87daec98513cde96eee7e8f9f8e01d 100644 (file)
@@ -66,8 +66,6 @@
 extern "C" {
 #endif
 
-#define ENGINE_REF_COUNT_DEBUG
-
 /* If we compile with this symbol defined, then both reference counts in the
  * ENGINE structure will be monitored with a line of output on stderr for each
  * change. This prints the engine's pointer address (truncated to unsigned int),
@@ -77,7 +75,7 @@ extern "C" {
 #ifdef ENGINE_REF_COUNT_DEBUG
 
 #define engine_ref_debug(e, isfunct, diff) \
-       fprintf(stderr, "blargle: %08x %s from %d to %d (%s:%d)\n", \
+       fprintf(stderr, "engine: %08x %s from %d to %d (%s:%d)\n", \
                (unsigned int)(e), (isfunct ? "funct" : "struct"), \
                ((isfunct) ? ((e)->funct_ref - (diff)) : ((e)->struct_ref - (diff))), \
                ((isfunct) ? (e)->funct_ref : (e)->struct_ref), \
@@ -89,6 +87,15 @@ extern "C" {
 
 #endif
 
+typedef struct engine_evp_cipher_st
+       {
+       const EVP_CIPHER *cipher;
+       } ENGINE_EVP_CIPHER;
+
+DECLARE_STACK_OF(ENGINE_EVP_CIPHER)
+
+void ENGINE_free_engine_cipher(ENGINE_EVP_CIPHER *p);
+
 /* NB: Bitwise OR-able values for the "flags" variable in ENGINE are now exposed
  * in engine.h. */
 
@@ -102,6 +109,7 @@ struct engine_st
        const DSA_METHOD *dsa_meth;
        const DH_METHOD *dh_meth;
        const RAND_METHOD *rand_meth;
+
        BN_MOD_EXP bn_mod_exp;
        BN_MOD_EXP_CRT bn_mod_exp_crt;
        ENGINE_GEN_INT_FUNC_PTR init;
@@ -109,6 +117,9 @@ struct engine_st
        ENGINE_CTRL_FUNC_PTR ctrl;
        ENGINE_LOAD_KEY_PTR load_privkey;
        ENGINE_LOAD_KEY_PTR load_pubkey;
+
+       STACK_OF(ENGINE_EVP_CIPHER) *ciphers;
+
        const ENGINE_CMD_DEFN *cmd_defns;
        int flags;
        /* reference count on the structure itself */
@@ -158,6 +169,10 @@ ENGINE *ENGINE_nuron();
 ENGINE *ENGINE_ubsec();
 #endif /* !OPENSSL_NO_HW_UBSEC */
 
+#ifdef OPENSSL_OPENBSD_DEV_CRYPTO
+ENGINE *ENGINE_openbsd_dev_crypto(void);
+#endif
+
 #endif /* !OPENSSL_NO_HW */
 
 #ifdef  __cplusplus