<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ustream-ssl, branch master</title>
<subtitle>ustream SSL wrapper</subtitle>
<id>https://git.openwrt.org/project/ustream-ssl/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/ustream-ssl/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/'/>
<updated>2026-07-08T21:21:18Z</updated>
<entry>
<title>ustream-mbedtls: use non-deprecated TLS version configuration API</title>
<updated>2026-07-08T21:21:18Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-08T21:11:21Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=cea28c5bc43ae80c3531c98f4e4dc67b7dcf0ebb'/>
<id>urn:sha1:cea28c5bc43ae80c3531c98f4e4dc67b7dcf0ebb</id>
<content type='text'>
mbedtls_ssl_conf_{min,max}_version() are deprecated since mbedTLS 3.0
in favour of mbedtls_ssl_conf_{min,max}_tls_version(). Wrap both in
version-guarded helpers so the build stays clean on 3.x while still
supporting mbedTLS 2.x.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ustream-openssl: report decodable error codes to notify_error</title>
<updated>2026-07-08T21:20:43Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-07T18:06:47Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=daedb1d3bb7dfa55905fd841ac10bd75f9426c8c'/>
<id>urn:sha1:daedb1d3bb7dfa55905fd841ac10bd75f9426c8c</id>
<content type='text'>
ustream_ssl_error() stored SSL_get_error() class codes, but
__ustream_ssl_strerror() hands the stored value to ERR_error_string(),
which expects packed error queue codes. Applications logging the error
string therefore only saw useless output like
"error:00000001:lib(0)::reason(1)". Store the packed code from the
error queue when one is available; ERR_clear_error() before each SSL
call ensures it belongs to the failed operation. Fall back to the
class code when the queue is empty or the code does not fit the int
member.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ustream-openssl: handle allocation failure in debug setup</title>
<updated>2026-07-08T21:20:21Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-07T18:05:50Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=8ba042d2f9acaa1b3614d0ac4e9d98f882cd152f'/>
<id>urn:sha1:8ba042d2f9acaa1b3614d0ac4e9d98f882cd152f</id>
<content type='text'>
__ustream_ssl_set_debug() passed an unchecked BIO_new() result to
BIO_set_callback_ex(), crashing on allocation failure. Leave debug
output disabled in that case.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ustream-ssl: detach from the underlying stream on init failure</title>
<updated>2026-07-08T21:19:57Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-07T18:05:21Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=3e95fabeaf22419b905861564af3707999648bbc'/>
<id>urn:sha1:3e95fabeaf22419b905861564af3707999648bbc</id>
<content type='text'>
_ustream_ssl_init() linked the underlying stream to the SSL stream
before session setup. When session allocation failed, conn-&gt;next and
us-&gt;conn kept pointing at the never initialised SSL stream, leaving a
dangling reference behind once the caller released it.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ustream-mbedtls: send close notify when freeing a session</title>
<updated>2026-07-08T21:19:37Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-07T18:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=27e0bfdde647538caca8f41f1bc286b6c5ad64df'/>
<id>urn:sha1:27e0bfdde647538caca8f41f1bc286b6c5ad64df</id>
<content type='text'>
The openssl backend calls SSL_shutdown() before SSL_free(), so peers
see a clean TLS shutdown. The mbedTLS backend freed the session
without sending a close notify alert, so the peer only saw the TCP
connection go away, which strict peers report as a truncation error.
Send the alert best effort before freeing; mbedtls_ssl_close_notify()
is a no-op for sessions without a completed handshake.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ustream-openssl: verify IP address peers against IP subjectAltNames</title>
<updated>2026-07-08T21:19:04Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-07T18:04:22Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=940614a0ab40c8ae37ec1d80a8082d98e3f6cc6c'/>
<id>urn:sha1:940614a0ab40c8ae37ec1d80a8082d98e3f6cc6c</id>
<content type='text'>
ustream_ssl_verify_cn() passed the peer name to X509_check_host(),
which only matches DNS subjectAltNames and the subject CN. Connecting
to a host by IP address literal therefore never validated against
certificates carrying a matching iPAddress subjectAltName, and CN
validation always failed for such peers. Detect IP address literals
and check them with X509_check_ip_asc() instead.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ustream-ssl: stop connect attempts after the stream was closed</title>
<updated>2026-07-08T21:18:48Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-07T18:02:59Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=50e46cd3ba86df4379e9d57f4f87c4fa72b3fdfa'/>
<id>urn:sha1:50e46cd3ba86df4379e9d57f4f87c4fa72b3fdfa</id>
<content type='text'>
When a notify_verify_error callback aborts connection setup by setting
the eof member, the stream stays in the not-connected state. Every
subsequent read, write or poll event then re-entered
__ustream_ssl_connect() on the already established session, which
re-ran certificate verification and invoked notify_verify_error again
for each event until the application finished tearing the connection
down. Skip connection attempts once the stream has been closed.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ustream-mbedtls: set valid_cert on successful verification</title>
<updated>2026-07-08T21:18:10Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-04T20:21:36Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=3f7f45ea7844d45705705887bab60fe335f1305e'/>
<id>urn:sha1:3f7f45ea7844d45705705887bab60fe335f1305e</id>
<content type='text'>
The openssl backend sets valid_cert when the verification result is
clean and a peer certificate is present, but the mbedTLS backend never
set it, so applications checking the documented valid_cert member
always saw the certificate as invalid when built against mbedTLS.

Require a present peer certificate to avoid claiming a valid
certificate for sessions where verification did not run, matching the
openssl backend behaviour. Note that builds without
MBEDTLS_SSL_KEEP_PEER_CERTIFICATE keep the old behaviour, since the
peer certificate is not available after the handshake there.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ustream-mbedtls: fix crashes on allocation and open failures</title>
<updated>2026-07-08T21:18:01Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-04T20:21:08Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=e115ee460f46ee9b7f421a3d61c788f5b2daf172'/>
<id>urn:sha1:e115ee460f46ee9b7f421a3d61c788f5b2daf172</id>
<content type='text'>
__ustream_ssl_save_session() passed an unchecked malloc() result to
mbedtls_ssl_session_save(), which writes to the buffer and crashes on
NULL. The fallback _random() implementation for non-Linux systems
dereferenced the FILE handle without checking whether opening
/dev/urandom succeeded.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
<entry>
<title>ustream-openssl: handle allocation failures in context and BIO setup</title>
<updated>2026-07-08T21:17:47Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2026-07-04T20:20:33Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/ustream-ssl/commit/?id=64855f594836d2743747ec11c8e76fa4b65d7ff6'/>
<id>urn:sha1:64855f594836d2743747ec11c8e76fa4b65d7ff6</id>
<content type='text'>
__ustream_ssl_context_new() dereferenced the calloc() result without a
check and leaked the SSL_CTX on failure. ustream_meth() passed an
unchecked BIO_meth_new() result to the BIO_meth_set_*() calls, and
ustream_bio_new() did the same with the BIO_new() result while also
leaking the bio_ctx allocation. Any of these crashed the process on
allocation failure, which does happen on memory constrained targets.

If BIO creation fails, the session is left without a BIO and the next
handshake attempt reports the error through the regular notify_error
path.

Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
</content>
</entry>
</feed>
