<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libssl/d1_pkt.c, branch OPENBSD_7_9</title>
<subtitle>A mirror of https://github.com/libressl/openbsd.git
</subtitle>
<id>https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9</id>
<link rel='self' href='https://git.lua4.win/openbsd/atom?h=OPENBSD_7_9'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/'/>
<updated>2025-03-12T14:03:55+00:00</updated>
<entry>
<title>Provide SSL_OP_NO_RENEGOTIATION and SSL_OP_ALLOW_CLIENT_RENEGOTIATION.</title>
<updated>2025-03-12T14:03:55+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2025-03-12T14:03:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=b150ad681869b78ec3662f92df947a5790b32862'/>
<id>urn:sha1:b150ad681869b78ec3662f92df947a5790b32862</id>
<content type='text'>
In January 2017 we added SSL_OP_NO_CLIENT_RENEGOTIATION, which results in a
SSL_AD_NO_RENEGOTIATION fatal alert if a ClientHello message is seen on an
active connection (client initiated renegotation). Then in May 2017 OpenSSL
added SSL_OP_NO_RENEGOTIATION, which results in a SSL_AD_NO_RENEGOTIATION
warning alert if a server receives a ClientHello on an active connection
(client initiated renegotation), or a client receives a HelloRequest
(server requested renegotation). This option also causes calls to
SSL_renegotiate() and SSL_renegotiate_abbreviated() to fail. Then in 2021,
OpenSSL also added SSL_OP_ALLOW_CLIENT_RENEGOTIATION, which trumps
SSL_OP_NO_RENEGOTIATION but only for incoming ClientHello messages
(apparently unsetting SSL_OP_NO_RENEGOTIATION is too hard).

Provide SSL_OP_NO_RENEGOTIATION and SSL_OP_ALLOW_CLIENT_RENEGOTIATION,
primarily to make life easier for ports. If SSL_OP_NO_CLIENT_RENEGOTIATION
is set it will take precedence and render SSL_OP_ALLOW_CLIENT_RENEGOTIATION
ineffective. The rest of the behaviour should match OpenSSL, with the
exception of ClientHellos triggering fatal alerts instead of warnings.

ok tb@
</content>
</entry>
<entry>
<title>Remove cipher from SSL_SESSION.</title>
<updated>2024-07-20T04:04:23+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2024-07-20T04:04:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=026ea65c83ed46dcfd89ada1f6250daa4fcc01b3'/>
<id>urn:sha1:026ea65c83ed46dcfd89ada1f6250daa4fcc01b3</id>
<content type='text'>
For a long time SSL_SESSION has had both a cipher ID and a pointer to
an SSL_CIPHER (and not both are guaranteed to be populated). There is also
a pointer to an SSL_CIPHER in the SSL_HANDSHAKE that denotes the cipher
being used for this connection. Some code has been using the cipher from
SSL_SESSION and some code has been using the cipher from SSL_HANDSHAKE.

Remove cipher from SSL_SESSION and use the version in SSL_HANDSHAKE
everywhere. If resuming from a session then we need to use the SSL_SESSION
cipher ID to set the SSL_HANDSHAKE cipher. And we still need to ensure that
we update the cipher ID in the SSL_SESSION whenever the SSL_HANDSHAKE
cipher changes (this only occurs in a few places).

ok tb@
</content>
</entry>
<entry>
<title>Simplify allocation checks</title>
<updated>2023-07-02T20:16:47+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2023-07-02T20:16:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e5a499b457594214c800e3c1912c252cf4b36960'/>
<id>urn:sha1:e5a499b457594214c800e3c1912c252cf4b36960</id>
<content type='text'>
Instead of attempting to allocate a few times and only then check all the
returned pointers for NULL, allocate and check one after the othre. This
is easier on the eyes and what we usually do.

Prompted by a report by Ilya Shipitsin

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>Reverse arguments in CBS_dup()</title>
<updated>2022-11-23T07:31:12+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2022-11-23T07:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d91fdc3a6b61ca64e9601694d2de34d422415c6b'/>
<id>urn:sha1:d91fdc3a6b61ca64e9601694d2de34d422415c6b</id>
<content type='text'>
We want to copy the tls_content_cbs() into the cbs, not the other way around

CID 377013

ok jsing
</content>
</entry>
<entry>
<title>Convert the legacy TLS stack to tls_content.</title>
<updated>2022-11-11T17:15:27+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-11-11T17:15:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=de50508f29672766d86ce907a002ff8fe4c49908'/>
<id>urn:sha1:de50508f29672766d86ce907a002ff8fe4c49908</id>
<content type='text'>
This converts the legacy TLS stack to tls_content - records are now
opened into a tls_content structure, rather than being written back into
the same buffer that the sealed record was read into.

This will allow for further clean up of the legacy record layer.

ok tb@
</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>Clean up {dtls1,ssl3}_read_bytes()</title>
<updated>2022-03-26T15:05:53+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-26T15:05:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=cb5a6c5bc2eacc54a81b940108d92c64bb97fed8'/>
<id>urn:sha1:cb5a6c5bc2eacc54a81b940108d92c64bb97fed8</id>
<content type='text'>
Now that {dtls1,ssl3}_read_bytes() have been refactored, do a clean up
pass - this cleans up various parts of the code and reduces differences
between these two functions.

ok = 1; *(&amp;(ok)) tb@

ok inoguchi@
</content>
</entry>
<entry>
<title>Remove the minimum record length checks from dtls1_read_bytes()</title>
<updated>2022-03-26T15:00:51+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-26T15:00:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=e8857aefebcf865da68becce2239c122ddc4c51e'/>
<id>urn:sha1:e8857aefebcf865da68becce2239c122ddc4c51e</id>
<content type='text'>
The code that handles each record type already has appropriate length
checks. Furthermore, the handling of application data here is likely
incorrect and bypasses the normal state checks at the end of this function.

ok inoguchi@ tb@
</content>
</entry>
<entry>
<title>Rewrite legacy DTLS unexpected handshake message handling.</title>
<updated>2022-03-18T18:00:54+00:00</updated>
<author>
<name>jsing</name>
<email></email>
</author>
<published>2022-03-18T18:00:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=92a14733c33ea6dd1f3b317e80d3d5e3deb0c0ba'/>
<id>urn:sha1:92a14733c33ea6dd1f3b317e80d3d5e3deb0c0ba</id>
<content type='text'>
Rewrite the code that handles unexpected handshake messages in the legacy
DTLS stack. Parse the DTLS message header up front, then process it based
on the message type. Overall the code should be more strict and we should
reject various invalid messages that would have previously been accepted.

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