openssl/include/crypto
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
..
__DECC_INCLUDE_EPILOGUE.H
__DECC_INCLUDE_PROLOGUE.H
aes_platform.h Fix AES-GCM on Power 8 CPUs 2022-09-13 14:41:39 +02:00
aria.h
asn1_dsa.h
asn1.h libcrypto and test: rename asn1_string_to_time_t to ossl_asn1_string_to_time_t 2022-07-19 08:44:19 +02:00
asn1err.h
async.h
asyncerr.h
bioerr.h BIO_dgram support for BIO_sendmmsg/BIO_recvmmsg 2022-09-01 18:03:10 +10:00
bn_conf.h.in
bn_dh.h
bn_srp.h
bn.h
bnerr.h RSA keygen update: Raise an error if no prime candidate q is found. 2022-06-13 10:56:31 +02:00
buffererr.h
chacha.h
cmll_platform.h
cmperr.h
cmserr.h CMS sign digest 2022-04-02 10:42:16 -04:00
comperr.h
conferr.h
context.h Refactor OSSL_LIB_CTX to avoid using CRYPTO_EX_DATA 2022-04-01 10:49:19 +11:00
crmferr.h
cryptlib.h
cryptoerr.h
cterr.h
ctype.h tolower: refine the tolower code to avoid a memory access 2022-05-23 09:51:28 +10:00
decoder.h Remove the _fetch_by_number functions 2022-05-06 10:38:55 +10:00
decodererr.h
des_platform.h
dh.h Update copyright year 2022-05-03 13:34:51 +01:00
dherr.h Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
dsa.h Update copyright year 2022-05-03 13:34:51 +01:00
dsaerr.h
dso_conf.h.in
ec.h Add HPKE DHKEM provider support for EC, X25519 and X448. 2022-09-23 09:24:47 +01:00
ecerr.h Add error code for unsupported explicit parameters 2022-04-14 08:51:18 +02:00
ecx.h Add HPKE DHKEM provider support for EC, X25519 and X448. 2022-09-23 09:24:47 +01:00
encoder.h Remove the _fetch_by_number functions 2022-05-06 10:38:55 +10:00
encodererr.h
engine.h
engineerr.h
err.h
ess.h
esserr.h
evp.h Limit the size of various MAXCHUNK definitions 2022-08-19 17:26:12 +10:00
evperr.h
hpke.h Add HPKE DHKEM provider support for EC, X25519 and X448. 2022-09-23 09:24:47 +01:00
httperr.h
lhash.h
md32_common.h Add ROTATE inline asm support for SM3 2022-06-22 12:46:50 +02:00
modes.h Implement AES-GCM-SIV (RFC8452) 2022-07-29 08:32:16 -04:00
objects.h
objectserr.h
ocsperr.h
pem.h
pemerr.h
pkcs7.h
pkcs7err.h
pkcs12err.h Allow PKCS12 export to set arbitrary bag attributes 2022-09-23 17:40:02 +01:00
poly1305.h
ppc_arch.h Update copyright year 2022-05-03 13:34:51 +01:00
punycode.h
rand_pool.h
rand.h Pre-declare all core dispatch table functions, and fix the internal ones 2022-07-13 07:56:51 +02:00
randerr.h
riscv_arch.def Add riscv scalar crypto extension capability 2022-06-10 11:45:41 +02:00
riscv_arch.h Add basic RISC-V cpuid and OPENSSL_riscvcap 2022-05-19 16:32:49 +10:00
rsa.h Update copyright year 2022-05-03 13:34:51 +01:00
rsaerr.h
security_bits.h
sha.h
siphash.h
siv.h
sm2.h
sm2err.h
sm4_platform.h SM4 optimization for ARM by ASIMD 2022-04-12 10:37:42 +02:00
sm4.h
sparc_arch.h
sparse_array.h
store.h Add method store cache flush and method removal to non-EVP operations 2022-05-05 15:06:12 +02:00
storeerr.h
tserr.h
types.h
uierr.h
x509.h X509: clean up doc and implementation of X509{,_REQ}_check_private_key() 2022-08-24 11:27:12 +02:00
x509err.h x509_att.c: improve error checking and reporting and coding style 2022-08-24 11:25:04 +02:00
x509v3err.h