On Wed, Apr 01, 2009, Rene Hollan wrote:

> Are there any hard and fast rules regarding which openssl functions allocate 
> memory which they expect the caller to then manage and which ones just return 
> a pointer to an existing structure?
> 
> I'm thinking about things like X509_get_issuer_name, X509_get_subject_name 
> (which, I think, return pointers), and X509_get_serialNumber (which seems to 
> return a copy).

Well newer functions with a '1' in them allocate, ones with a '0' do not. 

Some older functions were written before this convention though.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to