<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libssl/tls13_legacy.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>2026-04-03T07:17:36+00:00</updated>
<entry>
<title>Mop up mac_packet.</title>
<updated>2026-04-03T07:17:36+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2026-04-03T07:17:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=34c9ebaffbf06ba9d8883c4adf8061fd670f54c4'/>
<id>urn:sha1:34c9ebaffbf06ba9d8883c4adf8061fd670f54c4</id>
<content type='text'>
This is a left over from when we accepted SSLv2 ClientHello messages.

ok kenjiro@
</content>
</entry>
<entry>
<title>Restore SSL_shutdown() two step sequence.</title>
<updated>2024-01-30T14:50:50+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2024-01-30T14:50:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=805729baee1dff3368eb79d9c05cb48c481c63b8'/>
<id>urn:sha1:805729baee1dff3368eb79d9c05cb48c481c63b8</id>
<content type='text'>
Change SSL_shutdown() such that it will return 0 after sending a
close-notify, before potentially returning 1 (indicating that a
close-notify has been sent and received) on a subsequent call. Some
software depends on this behaviour, even though there are cases where
the first call could immediately return 1 (for example, when the peer
has already sent a close-notify prior to SSL_shutdown() being called).

ok tb@
</content>
</entry>
<entry>
<title>Rework tls13_legacy_shutdown() to match the legacy stack behaviour.</title>
<updated>2024-01-27T14:34:28+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2024-01-27T14:34:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b0b766b5b5c5411258cbc632cbf220c8d26354e3'/>
<id>urn:sha1:b0b766b5b5c5411258cbc632cbf220c8d26354e3</id>
<content type='text'>
Respect the ssl-&gt;shutdown flags rather than what has actually happened,
return -1 for all EOF errors and completely ignore the return value when
attempting to read a close-notify from the wire.

ok tb@
</content>
</entry>
<entry>
<title>Make tls13_legacy_return_code() static.</title>
<updated>2024-01-27T14:31:01+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2024-01-27T14:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=45ebc1fd8bf20df5839902550fef5aeb0e072ec5'/>
<id>urn:sha1:45ebc1fd8bf20df5839902550fef5aeb0e072ec5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Switch to legacy method late in tls13_use_legacy_stack()</title>
<updated>2023-11-28T13:19:04+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-11-28T13:19:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=46107348a293c6705c99e4c1c478f0f02ec3abfb'/>
<id>urn:sha1:46107348a293c6705c99e4c1c478f0f02ec3abfb</id>
<content type='text'>
If memory allocation of s-&gt;init_buf fails in ssl3_setup_init_buffer()
during downgrade to the legacy stack, the legacy state machine would
resume with an incorrectly set up SSL, resulting in a NULL dereference.
The fix is to switch to the legacy method only after the SSL is fully
set up. There is a second part to this fix, which will be committed
once we manage to agree on the color of the bikeshed.

Detailed analysis and patch from Masaru Masuda, many thanks!
https://github.com/libressl/openbsd/issues/146

ok jsing
</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>Get rid of SSL_CTX_INTERNAL and SSL_INTERNAL.</title>
<updated>2022-10-02T16:36:42+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-10-02T16:36:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=efde998d3821e41e124a4bfcdf103e506055fc52'/>
<id>urn:sha1:efde998d3821e41e124a4bfcdf103e506055fc52</id>
<content type='text'>
These are no longer necessary due to SSL_CTX and SSL now being fully
opaque. Merge SSL_CTX_INTERNAL back into SSL_CTX and SSL_INTERNAL back
into SSL.

Prompted by tb@
</content>
</entry>
<entry>
<title>Pass SSL pointer to tls13_ctx_new().</title>
<updated>2022-07-17T15:49:20+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-07-17T15:49:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=aa01620723c4a62e50c3f8ec40f18389e2240ca8'/>
<id>urn:sha1:aa01620723c4a62e50c3f8ec40f18389e2240ca8</id>
<content type='text'>
struct tls13_ctx already knows about SSL's and this way tls13_ctx_new() can
set up various pointers, rather than duplicating this in
tls13_legacy_accept() and tls13_legacy_connect().

ok tb@
</content>
</entry>
<entry>
<title>Handle zero byte reads/writes that trigger handshakes in the TLSv1.3 stack.</title>
<updated>2022-02-06T16:08:14+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-02-06T16:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a57b110b583fdbdc7a174b8f593acae516c3caba'/>
<id>urn:sha1:a57b110b583fdbdc7a174b8f593acae516c3caba</id>
<content type='text'>
With the legaacy stack, it is possible to do a zero byte SSL_read() or
SSL_write() that triggers the handshake, but then returns zero without
SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE being flagged. This currently
works in the TLSv1.3 stack by returning TLS_IO_WANT_POLLIN or
TLS_IO_WANT_POLLOUT, which is then hidden by SSL_get_error().

However, due to upcoming changes to SSL_get_error() this will no longer be
the case. In order to maintain the existing legacy behaviour, explicitly
handle zero byte reads and writes in the TLSv1.3 stack, following
completion of a handshake.

ok inoguchi@ tb@
</content>
</entry>
<entry>
<title>Bye bye S3I.</title>
<updated>2022-02-05T14:54:10+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-02-05T14:54:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=a463011117e88ea3125fb580b8c6c60d68722651'/>
<id>urn:sha1:a463011117e88ea3125fb580b8c6c60d68722651</id>
<content type='text'>
S3I has served us well, however now that libssl is fully opaque it is time
to say goodbye. Aside from removing the calloc/free/memset, the rest is
mechanical sed.

ok inoguchi@ tb@
</content>
</entry>
</feed>
