Session Memory Leek?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Session Memory Leek?

Perry L. Jones
I have been trying to figure this out for days now and can't seem to
find the solution?  Someone please give me guidance or I am going to cry!

I have a server application using session caching.  I have used the
following function to setup session caching:

SSL_CTX_set_session_id_context( ctx, sessionIdContext, sIdLen);
SSL_CTX_set_session_cache_mode( ctx,  
SSL_SESS_CACHE_NO_INTERNAL|SSL_SESS_CACHE_SERVER );
SSL_CTX_set_timeout( ctx, sessionCacheTimeout );
SSL_CTX_sess_set_new_cb( ctx, NewSessionCallBack );
SSL_CTX_sess_set_remove_cb( ctx, RemoveSessionCallBack );
SSL_CTX_sess_set_get_cb( ctx, GetSessionCallBack );

If the client connects with a session the GetSessionCallBack function is
called and loads the session from a file on disk.

session = PEM_read_bio_SSL_SESSION( bio, NULL, NULL, cachePassword );
retrun session;

If the session has expired then it looks like the session is not freed
before the connection  renegotiate a new session?

Should I check in the GetSessionCallBack if a session has already
expired before returning it or do I need to call something else to clean
this session up?

Thanks,
Perry
______________________________________________________________________
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: Session Memory Leek?

caveman007
What about the 'copy' parameter og get_session_cb() ?
Probably you're using it, but haven't noticed in your question...