<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openbsd/src/lib/libtls/tls.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-16T07:28:00+00:00</updated>
<entry>
<title>libtls: prefer x version of error setting</title>
<updated>2026-04-16T07:28:00+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2026-04-16T07:28:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=4ab01251a636fac40d8a39e8cc3ba506580aa79b'/>
<id>urn:sha1:4ab01251a636fac40d8a39e8cc3ba506580aa79b</id>
<content type='text'>
If a check fails and errno is not necessarily set by the previous API call
use tls_set_errorx() or tls_error_setx() since turning an unrelated errno
into an error string is unhelpful.

From Michael Forney

ok bcook
</content>
</entry>
<entry>
<title>Remove spaces before tabs</title>
<updated>2024-04-08T20:47:32+00:00</updated>
<author>
<name>tb</name>
<email></email>
</author>
<published>2024-04-08T20:47:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d52332356c8ba6fc11d87f6d466baff39351a3ee'/>
<id>urn:sha1:d52332356c8ba6fc11d87f6d466baff39351a3ee</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add TLS_ERROR_INVALID_ARGUMENT error code to libtls</title>
<updated>2024-03-27T07:35:30+00:00</updated>
<author>
<name>joshua</name>
<email></email>
</author>
<published>2024-03-27T07:35:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=2f91b3106eca7de0d2c1cd49842ac4b5e027fc63'/>
<id>urn:sha1:2f91b3106eca7de0d2c1cd49842ac4b5e027fc63</id>
<content type='text'>
This is an initial pass, defining the error code and using it for
"too long"/length-related errors.

ok beck jsing
</content>
</entry>
<entry>
<title>Add TLS_ERROR_INVALID_CONTEXT error code to libtls</title>
<updated>2024-03-26T08:54:48+00:00</updated>
<author>
<name>joshua</name>
<email></email>
</author>
<published>2024-03-26T08:54:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=770136de1e8bfda122badbcfdd67920088e8d5fc'/>
<id>urn:sha1:770136de1e8bfda122badbcfdd67920088e8d5fc</id>
<content type='text'>
ok jsing@ beck@
</content>
</entry>
<entry>
<title>Add error code support to libtls</title>
<updated>2024-03-26T06:24:52+00:00</updated>
<author>
<name>joshua</name>
<email></email>
</author>
<published>2024-03-26T06:24:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=bd68c6e1694d8d4eb801f32889da4cdde0b3c311'/>
<id>urn:sha1:bd68c6e1694d8d4eb801f32889da4cdde0b3c311</id>
<content type='text'>
This adds tls_config_error_code() and tls_error_code(), which will become
public API at a later date.

Additional error codes will be added in follow-up commits.

ok jsing@ beck@
</content>
</entry>
<entry>
<title>Use errno_value instead of num for readability</title>
<updated>2024-03-26T01:15:57+00:00</updated>
<author>
<name>joshua</name>
<email></email>
</author>
<published>2024-03-26T01:15:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ee7e62cdf4d4e04bf4fda6d714413ae19ff1f2ae'/>
<id>urn:sha1:ee7e62cdf4d4e04bf4fda6d714413ae19ff1f2ae</id>
<content type='text'>
ok jsing@
</content>
</entry>
<entry>
<title>Use errno_value instead of num for readability</title>
<updated>2024-03-26T00:50:22+00:00</updated>
<author>
<name>joshua</name>
<email></email>
</author>
<published>2024-03-26T00:50:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=ebb5d184382e45fee186dab409ffc48de54983b6'/>
<id>urn:sha1:ebb5d184382e45fee186dab409ffc48de54983b6</id>
<content type='text'>
ok beck@ jsing@
</content>
</entry>
<entry>
<title>Remove the ability to do tls 1.0 and 1.1 from libtls.</title>
<updated>2023-07-02T06:37:27+00:00</updated>
<author>
<name>beck</name>
<email></email>
</author>
<published>2023-07-02T06:37:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=908a2337ae4c28163a92b9fda969dbdd36bc634b'/>
<id>urn:sha1:908a2337ae4c28163a92b9fda969dbdd36bc634b</id>
<content type='text'>
With this change any requests from configurations to request
versions of tls before tls 1.2 will use tls 1.2. This prepares
us to deprecate tls 1.0 and tls 1.1 support from libssl.

ok tb@
</content>
</entry>
<entry>
<title>libtls: switch ECDSA_METHOD usage to EC_KEY_METHOD</title>
<updated>2023-06-18T11:43:03+00:00</updated>
<author>
<name>op</name>
<email></email>
</author>
<published>2023-06-18T11:43:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=d4df7cddd1d4ded9778f0ab6b2c234b2d54515c3'/>
<id>urn:sha1:d4df7cddd1d4ded9778f0ab6b2c234b2d54515c3</id>
<content type='text'>
smtpd and the bits it needs in libtls are the only consumer left of
ECDSA_METHOD, which is long deprecated.  This paves the way for the
removal in libcrypto.

The diff is from gilles' work on OpenSMTPD-portable, libretls had a
similar diff.

ok tb@, jsing@
</content>
</entry>
<entry>
<title>Forcibly update the EVP_PKEY's internal key</title>
<updated>2023-05-25T07:46:21+00:00</updated>
<author>
<name>op</name>
<email></email>
</author>
<published>2023-05-25T07:46:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/openbsd/commit/?id=38d31da6097a882f2d9c61b4831257122ba27fc1'/>
<id>urn:sha1:38d31da6097a882f2d9c61b4831257122ba27fc1</id>
<content type='text'>
To aid privilege separation, libtls maintains application-specific data
on the key inside the EVP_PKEY abstraction because the EVP API doesn't
provide a way to do that on the EVP_PKEY itself.

OpenSSL 3 changed behavior of EVP_PKEY_get1_RSA() and related functions.
These now return a struct from some cache.  Thus, modifying the RSA will
no longer modify the EVP_PKEY like it did previously, which was clearly
implied to be the case in the older documentation.
This is a subtle breaking change that affects several applications.

While this is documented, no real solution is provided.  The transition
plan from one OpenSSL major version to the next one tends to involve
many #ifdef in the ecosystem, and the only suggestion provided by the
new documentation is to switch to a completely unrelated, new API.

Instead, forcibly reset the internal key on EVP_PKEY after modification,
this way the change is picked up also by OpenSSL 3.

Fixes issue 1171 in OpenSMTPD-portable

ok tb@, jsing@
</content>
</entry>
</feed>
