]> git.ipfire.org Git - thirdparty/openssl.git/commit - crypto/core_namemap.c
Always check CRYPTO_LOCK_{read,write}_lock
authorRich Salz <rsalz@akamai.com>
Thu, 18 Feb 2021 20:31:56 +0000 (15:31 -0500)
committerPauli <ppzgs1@gmail.com>
Sun, 14 Mar 2021 05:33:34 +0000 (15:33 +1000)
commitcd3f8c1b11b0b9f4163bc8c62cbae38aec1b4030
treede59d50b2ff9b2bd73a1ebf08eedf78d8ba44aa3
parentf62846b703d163265176fe960ec7d087b4c3fa96
Always check CRYPTO_LOCK_{read,write}_lock

Some functions that lock things are void, so we just return early.

Also make ossl_namemap_empty return 0 on error.  Updated the docs, and added
some code to ossl_namemap_stored() to handle the failure, and updated the
tests to allow for failure.

Fixes: #14230
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14238)
37 files changed:
crypto/bio/b_addr.c
crypto/bn/bn_mont.c
crypto/context.c
crypto/core_namemap.c
crypto/engine/eng_ctrl.c
crypto/engine/eng_dyn.c
crypto/engine/eng_init.c
crypto/engine/eng_list.c
crypto/engine/eng_pkey.c
crypto/engine/eng_table.c
crypto/engine/tb_asnmth.c
crypto/err/err.c
crypto/evp/keymgmt_lib.c
crypto/ex_data.c
crypto/init.c
crypto/initthread.c
crypto/mem_sec.c
crypto/objects/o_names.c
crypto/provider_core.c
crypto/rand/rand_lib.c
crypto/rsa/rsa_ossl.c
crypto/store/store_register.c
crypto/threads_none.c
crypto/threads_pthread.c
crypto/threads_win.c
crypto/trace.c
crypto/ui/ui_openssl.c
crypto/x509/by_dir.c
crypto/x509/pcy_cache.c
crypto/x509/v3_purp.c
crypto/x509/x_crl.c
doc/internal/man3/ossl_namemap_new.pod
include/openssl/crypto.h.in
providers/fips/self_test.c
ssl/ssl_lib.c
ssl/ssl_sess.c
test/namemap_internal_test.c