<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openssl/crypto/encode_decode/decoder_lib.c, branch openssl-3.3.1</title>
<subtitle>TLS/SSL and crypto library.</subtitle>
<id>http://git.bktus.com/gpgfrontend/openssl/atom?h=openssl-3.3.1</id>
<link rel='self' href='http://git.bktus.com/gpgfrontend/openssl/atom?h=openssl-3.3.1'/>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/'/>
<updated>2023-09-07T08:59:15Z</updated>
<entry>
<title>Copyright year updates</title>
<updated>2023-09-07T08:59:15Z</updated>
<author>
<name>Matt Caswell</name>
<email>matt@openssl.org</email>
</author>
<published>2023-09-07T08:59:15Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=da1c088f599af3755aaeed1c447a39621ef12e1f'/>
<id>urn:sha1:da1c088f599af3755aaeed1c447a39621ef12e1f</id>
<content type='text'>
Reviewed-by: Richard Levitte &lt;levitte@openssl.org&gt;
Release: yes
</content>
</entry>
<entry>
<title>Always add a suitable error if we fail to decode</title>
<updated>2023-08-01T18:08:28Z</updated>
<author>
<name>Matt Caswell</name>
<email>matt@openssl.org</email>
</author>
<published>2023-07-31T11:30:34Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=564e5b754a4680dfad38585dd73bcf025567b448'/>
<id>urn:sha1:564e5b754a4680dfad38585dd73bcf025567b448</id>
<content type='text'>
We're always supposed to add the fallback "unsupported" error if we don't
have anything better. However in some cases this wasn't happening because
we were incorrectly setting "flag_construct_called" - even though the
construct function had failed.

Reviewed-by: Tim Hudson &lt;tjh@openssl.org&gt;
Reviewed-by: Tomas Mraz &lt;tomas@openssl.org&gt;
(Merged from https://github.com/openssl/openssl/pull/21603)
</content>
</entry>
<entry>
<title>Optimise PKEY decoders</title>
<updated>2023-07-16T22:12:06Z</updated>
<author>
<name>Matt Caswell</name>
<email>matt@openssl.org</email>
</author>
<published>2023-07-10T16:41:06Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=32d3c3abf3b74df1d9ebe562ba90f4dc3bdf2d4f'/>
<id>urn:sha1:32d3c3abf3b74df1d9ebe562ba90f4dc3bdf2d4f</id>
<content type='text'>
The most expensive part of using a PKEY decoder is the
OSSL_DECODER_CTX_new_for_pkey() call. This builds up all of the decoder
chains, which is a complex and time consuming operation. However, if no
new providers have been loaded/unloaded since the last time it was called
we can expect the same results for the same parameters. Note that this
operation takes place *before* we event parse the data for decoding so it
is not dependent on the parsed data at all.

We introduce a cache for OSSL_DECODER_CTX objects. If we have been called
with the same parameters then we just duplicate an existing
OSSL_DECODER_CTX. This should be significantly faster than creating a new
one every time.

Partially addressed the issue in #15199

Reviewed-by: Tomas Mraz &lt;tomas@openssl.org&gt;
Reviewed-by: Paul Dale &lt;pauli@openssl.org&gt;
(Merged from https://github.com/openssl/openssl/pull/21426)
</content>
</entry>
<entry>
<title>Stop raising ERR_R_MALLOC_FAILURE in most places</title>
<updated>2022-10-05T12:02:03Z</updated>
<author>
<name>Richard Levitte</name>
<email>levitte@openssl.org</email>
</author>
<published>2022-09-29T11:57:34Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=e077455e9e57ed4ee4676996b4a9aa11df6327a6'/>
<id>urn:sha1:e077455e9e57ed4ee4676996b4a9aa11df6327a6</id>
<content type='text'>
Since OPENSSL_malloc() and friends report ERR_R_MALLOC_FAILURE, and
at least handle the file name and line number they are called from,
there's no need to report ERR_R_MALLOC_FAILURE where they are called
directly, or when SSLfatal() and RLAYERfatal() is used, the reason
`ERR_R_MALLOC_FAILURE` is changed to `ERR_R_CRYPTO_LIB`.

There were a number of places where `ERR_R_MALLOC_FAILURE` was reported
even though it was a function from a different sub-system that was
called.  Those places are changed to report ERR_R_{lib}_LIB, where
{lib} is the name of that sub-system.
Some of them are tricky to get right, as we have a lot of functions
that belong in the ASN1 sub-system, and all the `sk_` calls or from
the CRYPTO sub-system.

Some extra adaptation was necessary where there were custom OPENSSL_malloc()
wrappers, and some bugs are fixed alongside these changes.

Reviewed-by: Tomas Mraz &lt;tomas@openssl.org&gt;
Reviewed-by: Hugo Landau &lt;hlandau@openssl.org&gt;
(Merged from https://github.com/openssl/openssl/pull/19301)
</content>
</entry>
<entry>
<title>Fix another decoder mem leak on an error path</title>
<updated>2022-06-02T09:31:12Z</updated>
<author>
<name>Matt Caswell</name>
<email>matt@openssl.org</email>
</author>
<published>2022-05-26T10:30:09Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=da3193976380b8bd697a472025ff9f384cbca7af'/>
<id>urn:sha1:da3193976380b8bd697a472025ff9f384cbca7af</id>
<content type='text'>
If pushing the decoder onto a stack fails then we should free the ref
we just created.

Found due to the error report here:
https://github.com/openssl/openssl/pull/18355#issuecomment-1138205688

Reviewed-by: Richard Levitte &lt;levitte@openssl.org&gt;
Reviewed-by: Shane Lontis &lt;shane.lontis@oracle.com&gt;
Reviewed-by: Paul Dale &lt;pauli@openssl.org&gt;
(Merged from https://github.com/openssl/openssl/pull/18411)
</content>
</entry>
<entry>
<title>Fix a decoder mem leak on an error path</title>
<updated>2022-06-02T09:31:12Z</updated>
<author>
<name>Matt Caswell</name>
<email>matt@openssl.org</email>
</author>
<published>2022-05-26T10:09:58Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=9ec9b968f93e4a8e7c90eb1e717f0d7cd4ab722d'/>
<id>urn:sha1:9ec9b968f93e4a8e7c90eb1e717f0d7cd4ab722d</id>
<content type='text'>
If an error condition occurs then the the decoder that was up-refed in
ossl_decoder_instance_new can be leaked.

Found due to the error report here:
https://github.com/openssl/openssl/pull/18355#issuecomment-1138205688

Reviewed-by: Tomas Mraz &lt;tomas@openssl.org&gt;
Reviewed-by: Shane Lontis &lt;shane.lontis@oracle.com&gt;
(Merged from https://github.com/openssl/openssl/pull/18410)
</content>
</entry>
<entry>
<title>Update copyright year</title>
<updated>2022-05-03T12:34:51Z</updated>
<author>
<name>Matt Caswell</name>
<email>matt@openssl.org</email>
</author>
<published>2022-05-03T10:52:38Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=fecb3aae22aeda493f348739ebf7943071ecdbe1'/>
<id>urn:sha1:fecb3aae22aeda493f348739ebf7943071ecdbe1</id>
<content type='text'>
Reviewed-by: Tomas Mraz &lt;tomas@openssl.org&gt;
Release: yes
</content>
</entry>
<entry>
<title>str[n]casecmp =&gt; OPENSSL_strncasecmp</title>
<updated>2022-04-22T09:34:41Z</updated>
<author>
<name>Dmitry Belyavskiy</name>
<email>beldmit@gmail.com</email>
</author>
<published>2022-04-12T10:30:08Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=fba140c73541c03e22b4fdb219a05d129bf0406d'/>
<id>urn:sha1:fba140c73541c03e22b4fdb219a05d129bf0406d</id>
<content type='text'>
Reviewed-by: Tim Hudson &lt;tjh@openssl.org&gt;
Reviewed-by: Tomas Mraz &lt;tomas@openssl.org&gt;
(Merged from https://github.com/openssl/openssl/pull/18069)
</content>
</entry>
<entry>
<title>Decoder resolution performance optimizations</title>
<updated>2022-03-23T08:19:07Z</updated>
<author>
<name>Hugo Landau</name>
<email>hlandau@openssl.org</email>
</author>
<published>2022-03-17T17:29:22Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=247554458435eaab175cdc9d36878158b9eb6f6e'/>
<id>urn:sha1:247554458435eaab175cdc9d36878158b9eb6f6e</id>
<content type='text'>
This refactors decoder functionality to reduce calls to
OSSL_DECODER_is_a / EVP_KEYMGMT_is_a, which are substantial bottlenecks
in the performance of repeated decode operations (see #15199).

Reviewed-by: Matt Caswell &lt;matt@openssl.org&gt;
Reviewed-by: Richard Levitte &lt;levitte@openssl.org&gt;
Reviewed-by: Paul Dale &lt;pauli@openssl.org&gt;
Reviewed-by: Tomas Mraz &lt;tomas@openssl.org&gt;
(Merged from https://github.com/openssl/openssl/pull/17921)
</content>
</entry>
<entry>
<title>Move e_os.h to include/internal</title>
<updated>2022-02-05T04:31:09Z</updated>
<author>
<name>Richard Levitte</name>
<email>levitte@openssl.org</email>
</author>
<published>2022-02-04T14:13:01Z</published>
<link rel='alternate' type='text/html' href='http://git.bktus.com/gpgfrontend/openssl/commit/?id=d5f9166bacfb3757dfd6117310ad54ab749b11f9'/>
<id>urn:sha1:d5f9166bacfb3757dfd6117310ad54ab749b11f9</id>
<content type='text'>
Including e_os.h with a path from a header file doesn't work well on
certain exotic platform.  It simply fails to build.

Since we don't seem to be able to stop ourselves, the better move is
to move e_os.h to an include directory that's part of the inclusion
path given to the compiler.

Reviewed-by: Paul Dale &lt;pauli@openssl.org&gt;
(Merged from https://github.com/openssl/openssl/pull/17641)
</content>
</entry>
</feed>
