> Yes changing the structures to pointers to structures was one idea I
> thought of. As you say there is a possiblity for memory leaks. Currently
> you can call EVP_DigestInit() for example when a digest operation is
> abandoned without ever calling EVP_DigestFinal() with no ill effects.
> You'd get leaks if you did that with the above system.

if you think that this property is important you can use alloca to
allocate memory in stack and define EVP_DigestInit as 

#define EVP_DigestInit(ctx,hash) \
        ctx= alloca(EVP_get_size_of_MD_CTX());\
        real_evp_digest_init(ctx,hash);

however i think that changing structures to pointers and hiding _init 
functions is in long term a better solution.

arne


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to