On Wed, Mar 25, 2015, Sahib Jakhar wrote: > Hi, > > I am trying to implement server side caching support for sessions by > using callback functions. However, the callback functions are never > being called, even though connection happens successfully without > session resumption. For your reference some of the sample code I am > pasting below: > > ssl_session_ctx_id = 1; > SSL_CTX_set_session_id_context (c, (void *)&ssl_session_ctx_id, sizeof > (ssl_session_ctx_id)); > SSL_CTX_set_session_cache_mode(c, SSL_SESS_CACHE_SERVER | > SSL_SESS_CACHE_NO_INTERNAL); > SSL_CTX_sess_set_new_cb (c, custom_new_session_cb ); > SSL_CTX_sess_set_remove_cb (c, custom_remove_session_cb ); > SSL_CTX_sess_set_get_cb (c, custom_get_session_cb); > > > Can somebody kindly help me as to what I am missing out here? What > could be the reason behind the callback functions not being called? > The client could be using session tickets which don't use a session cache. You can try disabling them by setting SSL_OP_NO_TICKET. Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org