<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 14, 2017 at 2:54 AM, Matt Caswell <span dir="ltr"><<a href="mailto:matt@openssl.org" target="_blank">matt@openssl.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-"><br>
<br>
On 13/07/17 23:52, Neetish Pathak wrote:<br>
> Hi All,<br>
> Help with these queries please,<br>
><br>
> 1) Is it possible to use external session files (with session info as<br>
> identifiers or tickets for out of band resumption) for session<br>
> resumption in TLS 1.2. Does it need some kind of callback like the way<br>
> it is used in TLS 1.3  with (SSL_set_psk_find_session_<wbr>callback) /<br>
> SSL_set_psk_use_session_<wbr>callback<br>
<br>
</span>I'm not entirely clear what you're asking here. The callbacks you<br>
mention are for setting up an external PSK in TLSv1.3. In TLSv1.3 we use<br>
an SSL_SESSION object to encapsulate the PSK details. This is different<br>
to session resumption, where the server sends the session details in a<br>
NewSessionTicket message in one connection, so that we can "resume" it<br>
in a later connection.<br>
<br>
So if your question is really "can you external session files for PSK in<br>
TLSv1.2" then the answer is no. PSK works completely differently in TLSv1.2.<br></blockquote><div><br></div><div>Thanks Matt, Apologies for ambiguity in the question</div><div><br></div><div>What I mean to ask is it possible to use out of band resumption in TLS 1.2?</div><div>How I perform the resumption in my programs using TLS 1.2 is as follows :</div><div>1)  Connect client to the server  for the first time</div><div>2) when the server sends session id or tickets as the case may be, new_session_callback is invoked on the client side and I save the session in a pem file using <span style="font-family:Courier;font-size:14px">PEM_write_bio_SSL_SESSION</span></div><div><font face="Courier"><span style="font-size:14px">3)Now when connecting client to the server next time, I read the session from the pem file and set using </span></font><span style="font-family:Courier;font-size:14px">SSL_set_session. </span></div><div><font face="Courier"><span style="font-size:14px">4)Session resumption is initiated from the client side and the server works as expected since it had been caching the session and was not killed.</span></font></div><div><br></div><div><font face="Courier"><span style="font-size:14px">I observe that the second connection (and subsequent connections) takes place using resumption. As per my understanding, this is called in-band resumption</span></font></div><div><font face="Courier"><span style="font-size:14px"><br></span></font></div><div><font face="Courier"><span style="font-size:14px">Now my question is if, I kill the server. I re-initialze the server and want to use the session(pem) file to connect to the server (this is a fresh connection which should take place using resumption).</span></font></div><div><font face="Courier"><span style="font-size:14px">In that case, I will need to set the session on both the ends right? Is this approach correct? In that case, how should one implement it. </span></font></div><div><font face="Courier"><span style="font-size:14px">This is out-of-band resumption for TLS 1.2 as per my understanding.</span></font></div><div><font face="Courier"><span style="font-size:14px">Please correct me if I am wrong</span></font></div><div><font face="Courier"><span style="font-size:14px"><br></span></font></div><div><font face="Courier"><span style="font-size:14px">Thanks</span></font></div><div><font face="Courier"><span style="font-size:14px">Best Regards,</span></font></div><div><font face="Courier"><span style="font-size:14px">Neetish</span></font></div><div><font face="Courier"><span style="font-size:14px"><br></span></font></div><div><font face="Courier"><span style="font-size:14px"><br></span></font></div><div><font face="Courier"><span style="font-size:14px">Thanks</span></font></div>















<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="gmail-"><br>
<br>
> 2) In TLS 1.3, is early data not enabled for out of band PSK session<br>
> resumption. Is it only possible with in-band session resumption.<br>
> SSL_write_early_data always fails when I load a session from a session<br>
> file to perform external PSK resumption before sending the session data.<br>
> For in-band resumption it succeeds.<br>
<br>
</span>Currently we only support early-data for ticket based resumption. You<br>
cannot do it with an external PSK. However this PR (which is currently<br>
going through review) will add that capability:<br>
<br>
<a href="https://github.com/openssl/openssl/pull/3926" rel="noreferrer" target="_blank">https://github.com/openssl/<wbr>openssl/pull/3926</a><br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
Matt<br>
<br>
--<br>
openssl-users mailing list<br>
To unsubscribe: <a href="https://mta.openssl.org/mailman/listinfo/openssl-users" rel="noreferrer" target="_blank">https://mta.openssl.org/<wbr>mailman/listinfo/openssl-users</a><br>
</font></span></blockquote></div><br></div></div>