<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libssl/tls13_handshake.c, branch OPENBSD_7_9_BASE</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9_BASE'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2024-02-03T19:57:14+00:00</updated>
<entry>
<title>Rework the exit path of tls13_handshake_recv_action()</title>
<updated>2024-02-03T19:57:14+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-02-03T19:57:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a9a190e264e21a6afd45894057d027938dc9fa82'/>
<id>urn:sha1:a9a190e264e21a6afd45894057d027938dc9fa82</id>
<content type='text'>
If an error occurs in action-&gt;recv() for a handshake that needs to
downgrade to legacy TLS, the artistic exit path led to hiding the
error under TLS13_IO_USE_LEGACY. Rework the exit path to be easier
to follow, preserving behavior except that the error can no longer
be masked.

Detailed analysis and initial diff by Masaru Masuda.
Fixes https://github.com/libressl/openbsd/issues/146

ok beck
</content>
</entry>
<entry>
<title>Make internal header file names consistent</title>
<updated>2022-11-26T16:08:57+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-26T16:08:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=81d98bf600a381a625eb11b39a725b08c0ba547f'/>
<id>urn:sha1:81d98bf600a381a625eb11b39a725b08c0ba547f</id>
<content type='text'>
Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names
used for internal headers. Move all these headers we inherited from
OpenSSL to *_local.h, reserving the name *_internal.h for our own code.
Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h.
constant_time_locl.h is moved to constant_time.h since it's special.

Adjust all .c files in libcrypto, libssl and regress.

The diff is mechanical with the exception of tls13_quic.c, where
#include &lt;ssl_locl.h&gt; was fixed manually.

discussed with jsing,
no objection bcook
</content>
</entry>
<entry>
<title>Drop unused KeyUpdate from debug printf</title>
<updated>2022-04-19T17:01:43+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-04-19T17:01:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=625e99509e8fec8674929f31ea4f0f815cb92763'/>
<id>urn:sha1:625e99509e8fec8674929f31ea4f0f815cb92763</id>
<content type='text'>
The handshake state machine does not handle key updates since that's a
post-handshake handshake message. This is code under #ifdef TLS13_DEBUG
and if it is ever to be reused in tls13_handshake_msg.c, that will have
to be revisited.

ok inoguchi jsing
</content>
</entry>
<entry>
<title>Implement flushing for TLSv1.3 handshakes.</title>
<updated>2021-09-16T19:25:30+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2021-09-16T19:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=30d2e422df85a55715b7f1da39294259d57b2b4f'/>
<id>urn:sha1:30d2e422df85a55715b7f1da39294259d57b2b4f</id>
<content type='text'>
When we finish sending a flight of records, flush the record layer output.
This effectively means calling BIO_flush() on the wbio.

Some things (such as apache2) have custom BIOs that perform buffering and
do not actually send on BIO_write(). Without BIO_flush() the server thinks
it has sent data and starts receiving records, however the client never
sends records since it never received those that the server should have
sent.

Joint work with tb@

ok tb@
</content>
</entry>
<entry>
<title>Merge SSL_METHOD_INTERNAL into SSL_METHOD.</title>
<updated>2021-07-01T17:53:39+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2021-07-01T17:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=909a6d9c0830e04a252ab680efffd5246ba048ba'/>
<id>urn:sha1:909a6d9c0830e04a252ab680efffd5246ba048ba</id>
<content type='text'>
Now that SSL_METHOD is opaque and in internal headers, we can remove
SSL_METHOD_INTERNAL by merging it back into SSL_METHOD.

ok tb@
</content>
</entry>
<entry>
<title>Use the order action-&gt;sender == ctx-&gt;mode everywhere for consistency.</title>
<updated>2021-06-28T18:48:56+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2021-06-28T18:48:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=330aefa2fa2605ab3fd793fdb28e1cd83ad04a4b'/>
<id>urn:sha1:330aefa2fa2605ab3fd793fdb28e1cd83ad04a4b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ctx-&gt;alert is not a boolean, so compare it explicitly against 0.</title>
<updated>2021-06-28T18:42:17+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2021-06-28T18:42:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f30d084586e1ac2fb3a46d57a32c438a66723116'/>
<id>urn:sha1:f30d084586e1ac2fb3a46d57a32c438a66723116</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Expand info callback support for TLSv1.3</title>
<updated>2021-06-28T15:35:14+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2021-06-28T15:35:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=f4c8b4bc678b2bc3d0623dda286734a44d1c68c4'/>
<id>urn:sha1:f4c8b4bc678b2bc3d0623dda286734a44d1c68c4</id>
<content type='text'>
During the TLSv1.3 handshake, update the legacy state and call the
info callback at the appropriate moment.  This is done by mapping
the TLSv1.3 states to the states in the old state machine whenever
that is possible. The callbacks are called at the beginning and end
of the handshake, and just before the state machine advances.

This should fix a periodic warning in logs of tor relays about a
variable that wasn't set although it should have been.

input/ok jsing, ok inoguchi (early version)
</content>
</entry>
<entry>
<title>Move the TLSv1.3 handshake struct inside the shared handshake struct.</title>
<updated>2021-03-21T18:36:34+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2021-03-21T18:36:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=087b119e33251560358cb9d7b82b5f8a17f03031'/>
<id>urn:sha1:087b119e33251560358cb9d7b82b5f8a17f03031</id>
<content type='text'>
There are currently three different handshake structs that are in use -
the SSL_HANDSHAKE struct (as S3I(s)-&gt;hs), the SSL_HANDSHAKE_TLS13 struct
(as S3I(s)-&gt;hs_tls13 or ctx-&gt;hs in the TLSv1.3 code) and the infamous
'tmp' embedded in SSL3_STATE_INTERNAL (as S3I(s)-&gt;tmp)).

This is the first step towards cleaning up the handshake structs so that
shared data is in the SSL_HANDSHAKE struct, with sub-structs for TLSv1.2
and TLSv1.3 specific information. Place SSL_HANDSHAKE_TLS13 inside
SSL_HANDSHAKE and change ctx-&gt;hs to refer to the SSL_HANDSHAKE struct
instead of the SSL_HANDSHAKE_TLS13 struct. This allows the TLSv1.3 code
to access the shared handshake data without needing the SSL struct.

ok inoguchi@ tb@
</content>
</entry>
<entry>
<title>Add minimal info callback support for TLSv1.3</title>
<updated>2020-07-30T16:23:17+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2020-07-30T16:23:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d72120f6c7c798dbddfd43101f7adba6a8f598e0'/>
<id>urn:sha1:d72120f6c7c798dbddfd43101f7adba6a8f598e0</id>
<content type='text'>
As abieber@ found the hard way, some python frameworks (twisted, synapse)
thought it a great idea to use the info callback mechanism (designed to
get state information about SSL objects) to modify state information such
as setting and verifying the SNI.  The switch of TLS_method() to default
to TLSv1.3 broke these contraptions.  Further bits of the info callback
mechanism will likely metastasize throughout the TLSv1.3 stack if we
need them, so we only do what's really necessary now.

Lots of debugging, crucial hint and testing by abieber

input &amp; ok jsing
</content>
</entry>
</feed>
