Previous changes permanently removed the commented-out old code for where
it was possible to create and use an ENGINE statically, and this code gets
rid of the ENGINE_FLAGS_MALLOCED flag that supported the distinction with
dynamically allocated ENGINEs. It also moves the area for ENGINE_FLAGS_***
values from engine_int.h to engine.h - because it should be possible to
declare ENGINEs just from declarations in exported headers.
#define ENGINE_METHOD_ALL (unsigned int)0xFFFF
#define ENGINE_METHOD_NONE (unsigned int)0x0000
+/* ENGINE flags that can be set by ENGINE_set_flags(). */
+/* #define ENGINE_FLAGS_MALLOCED 0x0001 */ /* Not used */
+
/* These flags are used to tell the ctrl function what should be done.
* All command numbers are shared between all engines, even if some don't
* make sense to some engines. In such a case, they do nothing but return
extern "C" {
#endif
-/* Bitwise OR-able values for the "flags" variable in ENGINE. */
-#define ENGINE_FLAGS_MALLOCED 0x0001
+/* NB: Bitwise OR-able values for the "flags" variable in ENGINE are now exposed
+ * in engine.h. */
/* This is a structure for storing implementations of various crypto
* algorithms and functions. */
return NULL;
}
memset(ret, 0, sizeof(ENGINE));
- ret->flags = ENGINE_FLAGS_MALLOCED;
ret->struct_ref = 1;
return ret;
}
abort();
}
#endif
- if(e->flags & ENGINE_FLAGS_MALLOCED)
- OPENSSL_free(e);
+ OPENSSL_free(e);
return 1;
}