openssl/ssl
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
..
quic Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
record Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
statem Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
bio_ssl.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
build.info time: move OSSL_TIME to libcrypto 2022-09-13 21:13:22 +10:00
d1_lib.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
d1_msg.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
d1_srtp.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
event_queue.c Make OSSL_TIME a structure 2022-08-12 15:44:01 +01:00
methods.c Update some inclusions of <openssl/macros.h> 2019-11-07 11:37:25 +01:00
pqueue.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
priority_queue.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
s3_enc.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
s3_lib.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
s3_msg.c Convert the write record layer to supply proper return values 2022-09-23 14:54:49 +01:00
ssl_asn1.c ssl: modify libssl so that it uses OSSL_TIME 2022-09-13 21:13:22 +10:00
ssl_cert_table.h
ssl_cert.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
ssl_ciph.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
ssl_conf.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
ssl_err_legacy.c Update copyright year 2021-06-17 13:24:59 +01:00
ssl_err.c Make the record layer directly aware of EtM 2022-08-18 16:38:12 +01:00
ssl_init.c err: get rid of err_free_strings_int() 2022-05-10 09:47:54 +02:00
ssl_lib.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
ssl_local.h ssl_log_secret call in tls13_key_update 2022-09-27 15:56:02 +01:00
ssl_mcnf.c SSL: refactor all SSLfatal() calls 2020-11-11 12:12:23 +01:00
ssl_rsa_legacy.c Deprecate RSA harder 2020-11-18 23:38:34 +01:00
ssl_rsa.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
ssl_sess.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
ssl_stat.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
ssl_txt.c ssl: modify libssl so that it uses OSSL_TIME 2022-09-13 21:13:22 +10:00
ssl_utst.c Reorganize local header files 2019-09-28 20:26:35 +02:00
sslerr.h Transfer the functionality from ssl3_read_n to the new record layer 2022-08-18 16:38:12 +01:00
t1_enc.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
t1_lib.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
t1_trce.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
tls13_enc.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
tls_depr.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
tls_srp.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00