[openssl-dev] [openssl.org #3824] FEATURE: Please provide a function to unintialize the library

Matt Caswell via RT rt at openssl.org
Tue Feb 9 15:22:36 UTC 2016


On Wed Apr 29 05:10:28 2015, noloader at gmail.com wrote:
> This question crops up on occasion: How do you shutdown the OpenSSL
> library. See, for example:
>
> * "How to properly uninitialize OpenSSL",
> http://stackoverflow.com/questions/29845527/how-to-properly-
> uninitialize-openssl.
> * "Order of Cleanup to avoid memory leaks?",
> http://comments.gmane.org/gmane.comp.encryption.openssl.user/50784
>
> If you look at an answer like questions and answers
> http://comments.gmane.org/gmane.comp.encryption.openssl.user/50784,
> its non-trivial to get right. There were at least ***8*** cleanup
> calls, and 1 was still missed.
>
> In addition, there are some things that cannot be cleaned up because
> they are not accessible outside the library. For example:
>
> * ssl_comp_methods
> *
> https://rt.openssl.org/Ticket/Display.html?id=2561&user=guest&pass=guest
> *
> http://rt.openssl.org/Ticket/Display.html?id=2439&user=guest&pass=guest
> * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584968.
>
> Please provide a function to unintialize the library. I imagine it
> would be similar to SSL_library_init(). But rather than having it
> create things, it would cleanup things.

Done.

In fact master now auto-initialises and deinitialises so no explicit init or
cleanup is required at all in most cases. There are some exceptions - see the
OPENSSL_INIT_crypto_library_start() and OPENSSL_INIT_ssl_library_start() man
pages in the latest master. Where explicit init and deinit is required there is
now a single function for each.

Closing this ticket.

Matt

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=3824
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list