ENGINE_NEW(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

πŸ’… ENGINE_NEW(3) β€” the "it's a stub, bestie" page

okay so real talk: this is a page from the Library Functions Manual (section 3, iykyk), and it's about a whole pile of ENGINE_* functions that literally do nothing anymore. iconic behaviour honestly. let's get into it πŸ’–


✨ NAME ✨

ENGINE_new, ENGINE_free, ENGINE_init, ENGINE_finish, ENGINE_ctrl_cmd, ENGINE_ctrl_cmd_string, ENGINE_by_id, ENGINE_get_id, ENGINE_get_name, ENGINE_set_default, ENGINE_get_default_RSA, ENGINE_set_default_RSA, ENGINE_load_private_key, ENGINE_load_public_key, ENGINE_load_builtin_engines, ENGINE_load_dynamic, ENGINE_load_openssl, ENGINE_register_all_complete, ENGINE_cleanup β€” the ENGINE stub functions 🫢


🌸 SYNOPSIS 🌸

library β€œlibcrypto”

#include <openssl/engine.h>

ENGINE *
ENGINE_new(void);

int
ENGINE_free(ENGINE *engine);

int
ENGINE_init(ENGINE *engine);

int
ENGINE_finish(ENGINE *engine);

int
ENGINE_ctrl_cmd(ENGINE *engine, const char *cmd_name, long i, void *p,
    void (*f)(void), int cmd_optional);

int
ENGINE_ctrl_cmd_string(ENGINE *engine, const char *cmd_name,
    const char *arg, int cmd_optional);

ENGINE *
ENGINE_by_id(const char *id);

const char *
ENGINE_get_id(const ENGINE *engine);

const char *
ENGINE_get_name(const ENGINE *engine);

int
ENGINE_set_default(ENGINE *engine, unsigned int flags);

ENGINE *
ENGINE_get_default_RSA(ENGINE *engine);

int
ENGINE_set_default_RSA(ENGINE *engine);

EVP_PKEY *
ENGINE_load_private_key(ENGINE *engine, const char *key_id,
    UI_METHOD *ui_method, void *callback_data);

EVP_PKEY *
ENGINE_load_public_key(ENGINE *engine, const char *key_id,
    UI_METHOD *ui_method, void *callback_data);

void
ENGINE_load_builtin_engines(void);

void
ENGINE_load_dynamic(void);

void
ENGINE_load_openssl(void);

int
ENGINE_register_all_complete(void);

void
ENGINE_cleanup(void);

like, yes, that's a lot of signatures. we love a thorough synopsis πŸ’€


πŸ¦‹ DESCRIPTION πŸ¦‹

so back in the day, ENGINE objects were these whole things that let you swap in alternative implementations of cryptographic algorithms β€” think fancy specialized hardware doing the math for you. very "main character energy" for your crypto stack ✨

but here's the tea: LibreSSL no longer supports this feature. periodt. it's gone.

⚠️ every single function on this page ignores all of its arguments and does absolutely nothing β€” except return failure when it's able to. they exist purely so that software expecting ENGINE support to be around doesn't have to get patched. it's giving "we kept the seat warm but nobody's coming" πŸͺ‘

πŸ’… RETURN VALUES πŸ’…

  • ENGINE_new(), ENGINE_by_id(), ENGINE_get_default_RSA(), ENGINE_load_private_key(), and ENGINE_load_public_key() β€” always return NULL. always. no notes 😭
  • ENGINE_free(), ENGINE_init(), ENGINE_finish(), ENGINE_ctrl_cmd(), ENGINE_ctrl_cmd_string(), ENGINE_set_default(), ENGINE_set_default_RSA(), and ENGINE_register_all_complete() β€” always return 0.
  • ENGINE_get_id() and ENGINE_get_name() β€” always return the constant empty string. just "". that's it. that's the whole vibe πŸ™ˆ

πŸŽ€ SEE ALSO πŸŽ€


πŸ‘‘ HISTORY πŸ‘‘

story time, bestie πŸ“

ENGINE_new(), ENGINE_free(), ENGINE_init(), ENGINE_finish(), ENGINE_by_id(), ENGINE_get_id(), ENGINE_get_name(), ENGINE_set_default(), ENGINE_get_default_RSA(), ENGINE_set_default_RSA(), ENGINE_load_private_key(), and ENGINE_load_public_key() first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 2.9.

then ENGINE_ctrl_cmd(), ENGINE_ctrl_cmd_string(), ENGINE_load_builtin_engines(), ENGINE_load_openssl(), ENGINE_register_all_complete(), and ENGINE_cleanup() first appeared in OpenSSL 0.9.7 too, and have been available since OpenBSD 3.4.

and finally β€” the glow-down of the century β€” all these functions were turned into stubs in OpenBSD 7.4. they had a good run πŸ’


and that's the whole page, bestie! written by the Debian crew, dated June 8, 2025, on the ENGINE_NEW(3) page β€” go off and remember: if your code calls these, it's getting NULL and 0 back and that's just how it is now. slay πŸ’…βœ¨

πŸ“¦ where this page comes from