<div dir="ltr">Hm... Thanks, but I think I miss some piece of the puzzle. How does client and server side session differ and how do they interact? I thought the TLS session was always cached on the server side and all the client would have to do was to send its session ID. <br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 30, 2016 at 12:00 AM Viktor Dukhovni <<a href="mailto:openssl-users@dukhovni.org">openssl-users@dukhovni.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
> On Sep 29, 2016, at 11:55 AM, Daniel Janzon <<a href="mailto:janzon@gmail.com" class="gmail_msg" target="_blank">janzon@gmail.com</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> For performance testing purposes, I would like to turn off session reuse in the (homegrown) client I use for testing. Is there a function in the openssl library to do it?<br class="gmail_msg">
><br class="gmail_msg">
> I tried googling for "openssl client don't send session id" but I didn't find anything useful.<br class="gmail_msg">
<br class="gmail_msg">
Just do nothing.  Client sessions are not reused unless you explicitly<br class="gmail_msg">
arrange for reuse of a session by calling SSL_set_session() before<br class="gmail_msg">
SSL_connect().  If you're trying to avoid wasting memory on storing<br class="gmail_msg">
client-side sessions that you'll never reuse then this may help:<br class="gmail_msg">
<br class="gmail_msg">
   SSL_CTX_set_session_cache_mode(client_ctx, SSL_SESS_CACHE_OFF);<br class="gmail_msg">
<br class="gmail_msg">
but note this is also the default state, so is also not needed unless<br class="gmail_msg">
some other code has explicitly enabled client-side caching of sessions.<br class="gmail_msg">
<br class="gmail_msg">
Only the server-side cache is enabled by default.<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
--<br class="gmail_msg">
        Viktor.<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
openssl-users mailing list<br class="gmail_msg">
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" class="gmail_msg" target="_blank">https://mta.openssl.org/mailman/listinfo/openssl-users</a><br class="gmail_msg">
</blockquote></div>