Richard Levitte - VMS Whacker wrote:
>
> I'm not sure I understand the use or purpose of CRYPTO_malloc_locked()
> and friends. Is it meant to be used for some kind of special locking,
> other than the locking that correctly implemented OS's have in their
> allocation routines?
>
> As far as I can see, CRYPTO_malloc_locked and friends are only used in
> crypto/rsa/rsa_lib.c (masqueraded as Malloc_locked() and Free_locked()).
>
> If it's supposed to be used for extra locking, wouldn't reimplementing
> them to use the OpenSSL locking routines be a good thing?
>
> The reason I'm asking is that I want to put some debugging code around
> the actual call to malloc_locked_func(), and it feels that code should
> be inside the lock as well...
>
The idea behind it is to allocate memory that is "locked" in core: that
is cannot be written to a swap file. It could thus be used for sensitive
information like private kets.
Thats the idea, unfortunately at present very few things actually use
it.
Steve.
--
Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED]
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]