[EMAIL PROTECTED] wrote:
> 
> > Well, it cannot do that for you.
> > X509_NAME_ENTRY_free() receives the pointer and has write access to change
> > the place to which the pointer is pointing, it however cannot manipulate
> > the pointer itself, which is defined in the calling function.
> > This would only be possible, if the call would be by reference:
> >       X509_NAME_ENTRY_free(&pX509NameEntry);
> > The OpenSSL way is however consistent with free() fclose() and a lot of
> > other
> > similar routines, where you of course have to take care of your pointers
> > yourself.
> >
>         I see your point and I agree it is a stupid suggestion :-)
>         But still. why does the code below then fail:

Because if you pass a reference that is non-null, then
X509_NAME_ENTRY_create_by_NID tries to use it instead of creating a new
one (I assume, haven't actually checked the code).

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to