285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainen/* Initialize OpenSSL if this is the first instance.
285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainen Increase initialization reference count. */
285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainen/* Deinitialize OpenSSL if this is the last instance. Returns TRUE if there
285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainen are more instances left. */
285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainenbool dovecot_openssl_common_global_unref(void);
285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainen/* Set OpenSSL engine if it's not already set. Returns 1 on success, 0 if engine
285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainen is unknown, -1 on other error. error_r is set on 0/-1. */
285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainenint dovecot_openssl_common_global_set_engine(const char *engine,
285bfe946c2d54928b272270dd5eef9041b24271Timo Sirainen const char **error_r);