Is it required to call SSL_library_init() if I only want to use some crypto
functionalities?
-Nitin
From: Darryl Miles <[EMAIL PROTECTED]>
Reply-To: openssl-dev@openssl.org
To: openssl-dev@openssl.org
Subject: Re: Memory Leaks in SSL_Library_init()
Date: Wed, 21 Mar 2007 11:12:38 +0000
Nitin M wrote:
Does this mean that in such scenario the application need not call
SSL_library_init since it does not need those extra initialisations and
can achieve only the required initialisations with specific calls?
If this is true I have two more questions here,
1. In what scenario then an application should use SSL_library_init()? I
think not for the simplest use of SSL/Crypto functionality in the
application.
2. If SSL_library_init() should be called only once in the lifetime of a
process and it is is creating some global data structures only once within
that process, why cant we have a function to clear all these global
variables which can be called at the the process termination time?
If you are using SSL then you are touching many parts of the OpenSSL
library as all the digests and crypto algorithms are pulled in to allow
them to be available for selection and negotiation. Most users want to
simple few function calls to auto-register all those methods.
The simplest use of OpenSSL is more inline with how I explained, an app
just wants to use a single digest algorithm (like MD5 or SHA1, but not
SSL).
As I still maintain you need to provide information about the leak(s) in
order to progress. Application usages goes like this:
* Application initializes the OpenSSL libary.
* Application creates and uses data object with the OpenSSL library.
* Application wants to shutdown.
* Application destroys all OpenSSL data objects it is holding.
* Application calls cleanup routines in the OpenSSL library.
This is pretty standard stuff, what David maybe highlighting is that many
programmers or a short-lived applications running on a process segmented
operating system might skip the last 2 points to save time/money.
Darryl
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager [EMAIL PROTECTED]
_________________________________________________________________
Sign in and get updated on all the action from Formula One
http://content.msn.co.in/Sports/FormulaOne/Default
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager [EMAIL PROTECTED]