Martin,
When I was looking at this, I found that the OpenSsl code uses s3->rbuf and s3->wbuf as scratch buffer. So, what I found is that, once the handshake is complete I could free these buffers safely until we have to send/receive any data on that SSL session. I reallocate s3->rbuf and s3->wbuf when I have to receive/send data on that session and free them as soon as the operation is over. I allocate these buffers from my memory pool which reduces any overhead associated with allocating and freeing buffers.
The changes I have done to achieve this are completely outside the OpenSsl code because I wanted to keep changes to OpenSsl minimum. However, OpenSsl code could be changed to have the same behavior.
You could use the function SSL_is_init_finished(pSSL_m) to determine whether the handshake is complete or not.
Look at the function "ssl3_setup_buffers" to see how these buffers are allocated.
Hopefully, this is helpful. Please feel free to send me a mail if you have more questions.
- Prashant.
Martin Del Vecchio <[EMAIL PROTECTED]> wrote:
In May, you posted a series of messages to the openssl-dev mailing list about per-session memory usage.I am running into the exact same problems, and I would love to get your patches to try them out.Thanks.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com