OpenBSD manual page server

Manual Page Search Parameters

ENGINE_INIT(3) Library Functions Manual ENGINE_INIT(3)

ENGINE_init, ENGINE_finish, ENGINE_set_init_function, ENGINE_set_finish_function, ENGINE_get_init_function, ENGINE_get_finish_functioninitialize ENGINE objects

#include <openssl/engine.h>

int
ENGINE_init(ENGINE *e);

int
ENGINE_finish(ENGINE *e);

typedef int
(*ENGINE_GEN_INT_FUNC_PTR)(ENGINE *e);

int
ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f);

int
ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);

ENGINE_GEN_INT_FUNC_PTR
ENGINE_get_init_function(const ENGINE *e);

ENGINE_GEN_INT_FUNC_PTR
ENGINE_get_finish_function(const ENGINE *e);

() initializes e by calling the init_f previously installed with (), if any. In case of success, it also increments both the structural and the functional reference count by 1. If no init_f was installed, ENGINE_init() always succeeds. Calling ENGINE_init() again after it already succeeded always succeeds, but has no effect except that it increments both the structural and the functional reference count by 1.

() decrements the functional reference count by 1. When it reaches 0, it calls the finish_f previously installed with (), if any. If no finish_f was installed, ENGINE_finish() always succeeds. Unless finish_f fails, ENGINE_finish() also calls ENGINE_free(3).

() is internally called by the functions documented in the ENGINE_get_default_RSA(3) manual page.

ENGINE_init() and ENGINE_finish() return 1 on success or 0 on error.

ENGINE_set_init_function() and ENGINE_set_finish_function() always return 1.

ENGINE_get_init_function() and ENGINE_get_finish_function() return a function pointer to the respective callback, or NULL if none is installed.

ENGINE_add(3), ENGINE_ctrl(3), ENGINE_get_default_RSA(3), ENGINE_new(3), ENGINE_register_RSA(3), ENGINE_set_default(3), ENGINE_set_flags(3), ENGINE_set_RSA(3), ENGINE_unregister_RSA(3)

These functions first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 2.9.

April 18, 2018 OpenBSD-6.4