Hi all,

I have written a TLS client using the OpenSSL library. It uses memory
BIOs as the input/output BIOs to the SSL connection.

The code flow of the client is as follows

* SSL_CTX_new(...)
* SSL_CTX_use_certificate_ASN1(...)
* SSL_CTX_use_RSAPrivateKey_ASN1(...)
* X509_STORE_add_cert(....) // To add CA cert
* other init actions

* for ever
    * SSL_new(...)
    * create read & write BIOs
    * SSL_connect(...)
    *  .....
    * SSL_free(...)
    * wait for reconnect event
* endfor

As the above code flow shows, the client has to periodically (based
on time or event) perform a TLS handshake with a TLS server for
authentication (EAP-TLS).

When this client is run for many iterations, it leaks memory. After
tracking OpenSSL mallocs, I have found that it leaks ~ 9K. This
9K leak does not happen for every iteration, but it happens for
every n iteration. (Sometimes n is 1 or 3, it is variable ).  Soon
this
leads to lack of memory because the app will be running for ever.

Any ideas on what could be causing the memory leak or tips on
how to trace back this memory leak,  is highly appreciated.

thanks,
Krishna

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

Reply via email to