diff options
author | Matt Caswell <matt@openssl.org> | 2016-04-04 16:12:39 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-13 08:52:33 +0100 |
commit | 6d4fb1d59e61aacefa25edc4fe5acfe1ac93f743 (patch) | |
tree | 2c67f2f0146b14025cdb73a7dae63ade6ac72df6 /doc | |
parent | 7b8cc9b3458ec3f18b4d4d9ca2a72b6b3e3744c8 (diff) |
Deprecate ENGINE_cleanup() and make it a no-op
ENGINE_cleanup() should not be called expicitly - we should leave
auto-deinit to clean this up instead.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/crypto/engine.pod | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/doc/crypto/engine.pod b/doc/crypto/engine.pod index c069fd778f..cb9308df83 100644 --- a/doc/crypto/engine.pod +++ b/doc/crypto/engine.pod @@ -23,8 +23,6 @@ engine - ENGINE cryptographic module support void ENGINE_load_builtin_engines(void); - void ENGINE_cleanup(void); - ENGINE *ENGINE_get_default_RSA(void); ENGINE *ENGINE_get_default_DSA(void); ENGINE *ENGINE_get_default_ECDH(void); @@ -134,6 +132,12 @@ engine - ENGINE cryptographic module support void ENGINE_add_conf_module(void); +Deprecated: + + #if OPENSSL_API_COMPAT < 0x10100000L + # define ENGINE_cleanup() + #endif + =head1 DESCRIPTION These functions create, manipulate, and use cryptographic modules in the @@ -300,21 +304,23 @@ dynamically allocated and populated with these implementations and linked into OpenSSL's internal linked list. At this point it is important to mention an important API function; - void ENGINE_cleanup(void); + ENGINE_cleanup() If no ENGINE API functions are called at all in an application, then there -are no inherent memory leaks to worry about from the ENGINE functionality, -however if any ENGINEs are loaded, even if they are never registered or -used, it is necessary to use the ENGINE_cleanup() function to -correspondingly cleanup before program exit, if the caller wishes to avoid -memory leaks. This mechanism uses an internal callback registration table +are no inherent memory leaks to worry about from the ENGINE functionality. +However, prior to OpenSSL 1.1.0 if any ENGINEs are loaded, even if they are +never registered or used, it was necessary to use the ENGINE_cleanup() function +to correspondingly cleanup before program exit, if the caller wishes to avoid +memory leaks. This mechanism used an internal callback registration table so that any ENGINE API functionality that knows it requires cleanup can register its cleanup details to be called during ENGINE_cleanup(). This -approach allows ENGINE_cleanup() to clean up after any ENGINE functionality +approach allowed ENGINE_cleanup() to clean up after any ENGINE functionality at all that your program uses, yet doesn't automatically create linker dependencies to all possible ENGINE functionality - only the cleanup callbacks required by the functionality you do use will be required by the -linker. +linker. From OpenSSL 1.1.0 it is no longer necessary to explicitly call +ENGINE_cleanup and this function is deprecated. Cleanup automatically takes +place at program exit. The fact that ENGINEs are made visible to OpenSSL (and thus are linked into the program and loaded into memory at run-time) does not mean they are @@ -553,7 +559,8 @@ L<OPENSSL_init_crypto(3)>, L<rsa(3)>, L<dsa(3)>, L<dh(3)>, L<rand(3)> =head1 HISTORY -ENGINE_load_openssl(), ENGINE_load_dynamic(), and ENGINE_load_cryptodev() -were deprecated in OpenSSL 1.1.0 by OPENSSL_init_crypto(). +ENGINE_cleanup(), ENGINE_load_openssl(), ENGINE_load_dynamic(), and +ENGINE_load_cryptodev() were deprecated in OpenSSL 1.1.0 by +OPENSSL_init_crypto(). =cut |