Problems compiling openssl 0.9.8a

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems compiling openssl 0.9.8a

Reinhard Haller
compiling openssl 0.9.8a on freebsd 4.11 I've got
errors making libcrypto.so.4:

libcrypto.a(cryptlib.o): In function `OPENSSL_showfatal':
cryptlib.o(.text+0x3c6): undefined reference to `__stderrp'
cryptlib.o(.text+0x3cd): undefined reference to `vfprintf'

....

libssl.a(s2_srvr.o): In function `ssl2_accept':
s2_srvr.o(.text+0x1d): undefined reference to `time'
s2_srvr.o(.text+0x46): undefined reference to `__error'

....

e_4758cca.o: In function `ibm_4758_load_privkey':
e_4758cca.o(.text+0x6d0): undefined reference to `memset'
e_4758cca.o(.text+0x6db): undefined reference to `memcpy'

After the make all appears to be built, but exim isn't able to
negotiate a TLS-connection.

What's wrong?

Thanks
Reinhard

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Memory leak in d2i_X509_fp ?

Calista
Hi,

if(!(x509 = d2i_X509_fp(fpin, NULL))) {
   fseek(fpin, 0, SEEK_SET);
   x509=PEM_read_X509(fpin, NULL, NULL, NULL);
}

CRYPTO_MDEBUG's output is:
[09:36:15]  1661 file=lhash.c, line=193, thread=121,
number=96, address=302DB948

I caught the address in the debugger and it is coming
from d2i_X509_fp.

I understand that d2i_X509_fp allocates memory. But
the file contains certificate in PEM format. So x509
is NULL and the code proceeds to PEM_read_X509 which I
free later with X509_free(). But the address leaked in
d2i_X509_fp .. how can I free it? Why is it allocating
memory if it returns x509? Finally the thread exists
.. cleaning.. and then I create it again.. but it
leaks memory again.

Thank you.
Calista.



               
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Memory leak in d2i_X509_fp ? - Err_remove_state(0)

Calista
Calling Err_remove_state(0) before the thread exits
fixed it :)

--- Calista <[hidden email]> wrote:

> Hi,
>
> if(!(x509 = d2i_X509_fp(fpin, NULL))) {
>    fseek(fpin, 0, SEEK_SET);
>    x509=PEM_read_X509(fpin, NULL, NULL, NULL);
> }
>
> CRYPTO_MDEBUG's output is:
> [09:36:15]  1661 file=lhash.c, line=193, thread=121,
> number=96, address=302DB948
>
> I caught the address in the debugger and it is
> coming
> from d2i_X509_fp.
>
> I understand that d2i_X509_fp allocates memory. But
> the file contains certificate in PEM format. So x509
> is NULL and the code proceeds to PEM_read_X509 which
> I
> free later with X509_free(). But the address leaked
> in
> d2i_X509_fp .. how can I free it? Why is it
> allocating
> memory if it returns x509? Finally the thread exists
> .. cleaning.. and then I create it again.. but it
> leaks memory again.
>
> Thank you.
> Calista.
>
>
>
>
> __________________________________
> Yahoo! FareChase: Search multiple travel sites in
> one click.
> http://farechase.yahoo.com
>
______________________________________________________________________
> OpenSSL Project                                
> http://www.openssl.org
> User Support Mailing List                  
> [hidden email]
> Automated List Manager                          
> [hidden email]
>



               
__________________________________
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]