openssl/providers
Matt Caswell 32d3c3abf3 Optimise PKEY decoders
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 <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21426)
2023-07-17 08:12:06 +10:00
..
common fips: update DSA security check to fix legacy verify strengths 2023-06-15 09:21:30 +10:00
fips fips: use tsan counter instead of tsan_add to increment 2023-06-16 20:10:23 +10:00
implementations Optimise PKEY decoders 2023-07-17 08:12:06 +10:00
baseprov.c Replaced '{ 0, NULL }' with OSSL_DISPATCH_END in OSSL_DISPATCH arrays 2023-04-21 16:19:11 +02:00
build.info Add VERSIONINFO resource to legacy provider if it is not builtin 2022-06-02 11:09:10 -04:00
decoders.inc configure: introduce no-ecx to remove ECX related feature 2023-06-14 13:06:22 +10:00
defltprov.c Add support for SHA256/192 2023-06-28 08:00:43 +10:00
encoders.inc configure: introduce no-ecx to remove ECX related feature 2023-06-14 13:06:22 +10:00
fips-sources.checksums Update the FIPS checksums 2023-05-22 15:14:31 +02:00
fips.checksum Update the FIPS checksums 2023-05-22 15:14:31 +02:00
fips.module.sources Update the FIPS checksums 2023-05-22 15:14:31 +02:00
legacyprov.c Replaced '{ 0, NULL }' with OSSL_DISPATCH_END in OSSL_DISPATCH arrays 2023-04-21 16:19:11 +02:00
nullprov.c Replaced '{ 0, NULL }' with OSSL_DISPATCH_END in OSSL_DISPATCH arrays 2023-04-21 16:19:11 +02:00
prov_running.c
stores.inc Add support for loading root CAs from Windows crypto API 2022-09-14 14:10:18 +01:00