openssl/providers/common
Richard Levitte e077455e9e Stop raising ERR_R_MALLOC_FAILURE in most places
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 <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19301)
2022-10-05 14:02:03 +02:00
..
der Remove redundant check for saltlen > UINT32_MAX 2022-06-29 15:23:13 +02:00
include/prov Update copyright year 2022-05-03 13:34:51 +01:00
bio_prov.c Fix misc external ossl_ symbols. 2021-03-18 17:52:37 +10:00
build.info Add PBKDF1 to the legacy provider 2021-05-24 15:21:25 +10:00
capabilities.c Update copyright year 2022-05-03 13:34:51 +01:00
digest_to_nid.c Allow arbitrary digests with ECDSA and DSA 2021-05-12 13:12:00 +02:00
provider_ctx.c Rename some occurrences of 'library_context' and 'lib_ctx' to 'libctx' 2020-10-15 12:00:21 +01:00
provider_err.c Add invalid input length error 2021-08-26 09:33:39 +10:00
provider_seeding.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
provider_util.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
securitycheck_default.c Store some FIPS global variables in the FIPS_GLOBAL structure 2021-04-16 14:27:28 +01:00
securitycheck_fips.c Store some FIPS global variables in the FIPS_GLOBAL structure 2021-04-16 14:27:28 +01:00
securitycheck.c Allow arbitrary digests with ECDSA and DSA 2021-05-12 13:12:00 +02:00