diff options
author | Tomas Mraz <tomas@openssl.org> | 2024-04-26 17:23:13 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-05-09 09:20:25 +0200 |
commit | 21819f78b057c254254646a7854bfad0cd40ed83 (patch) | |
tree | 296fa3737de9f8a5f4fe2374ba2447ea0e9c663d /crypto | |
parent | f6ce48f5b8ad4d8d748ea87d2490cbed08db9936 (diff) | |
download | openssl-21819f78b057c254254646a7854bfad0cd40ed83.tar.gz |
Make conf_diagnostics apply also to the SSL conf errors
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24275)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/conf/conf_mod.c | 1 | ||||
-rw-r--r-- | crypto/context.c | 17 | ||||
-rw-r--r-- | crypto/err/openssl.txt | 1 |
3 files changed, 19 insertions, 0 deletions
diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c index ccd28a146a..3fa216dc1f 100644 --- a/crypto/conf/conf_mod.c +++ b/crypto/conf/conf_mod.c @@ -214,6 +214,7 @@ int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename, ret = CONF_modules_load(conf, appname, flags); diagnostics = conf_diagnostics(conf); + OSSL_LIB_CTX_set_conf_diagnostics(libctx, diagnostics); err: if (filename == NULL) diff --git a/crypto/context.c b/crypto/context.c index 3d55084d7b..fa46abab6b 100644 --- a/crypto/context.c +++ b/crypto/context.c @@ -50,6 +50,7 @@ struct ossl_lib_ctx_st { #endif unsigned int ischild:1; + unsigned int conf_diagnostics:1; }; int ossl_lib_ctx_write_lock(OSSL_LIB_CTX *ctx) @@ -666,3 +667,19 @@ CRYPTO_THREAD_LOCAL *ossl_lib_ctx_get_rcukey(OSSL_LIB_CTX *libctx) return NULL; return &libctx->rcu_local_key; } + +int OSSL_LIB_CTX_get_conf_diagnostics(OSSL_LIB_CTX *libctx) +{ + libctx = ossl_lib_ctx_get_concrete(libctx); + if (libctx == NULL) + return 0; + return libctx->conf_diagnostics; +} + +void OSSL_LIB_CTX_set_conf_diagnostics(OSSL_LIB_CTX *libctx, unsigned int value) +{ + libctx = ossl_lib_ctx_get_concrete(libctx); + if (libctx == NULL) + return; + libctx->conf_diagnostics = value != 0; +} diff --git a/crypto/err/openssl.txt b/crypto/err/openssl.txt index 5102c481e3..0584f687c9 100644 --- a/crypto/err/openssl.txt +++ b/crypto/err/openssl.txt @@ -1400,6 +1400,7 @@ SSL_R_EMPTY_RAW_PUBLIC_KEY:349:empty raw public key SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST:354:empty srtp protection profile list SSL_R_ENCRYPTED_LENGTH_TOO_LONG:150:encrypted length too long SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST:151:error in received cipher list +SSL_R_ERROR_IN_SYSTEM_DEFAULT_CONFIG:419:error in system default config SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN:204:error setting tlsa base domain SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE:194:exceeds max fragment size SSL_R_EXCESSIVE_MESSAGE_SIZE:152:excessive message size |