From: dare3path Date: Fri, 28 Mar 2025 06:54:55 +0000 (+0100) Subject: move BIO_err_is_non_fatal() to bio_lib.c X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d3202e20f73f8d368004a90d743a613b51f0d62;p=thirdparty%2Fopenssl.git move BIO_err_is_non_fatal() to bio_lib.c done this without running mkerr.pl otherwise this is what mkerr.pl would do: * remove BIO_err_is_non_fatal from bio_err.c * remove duplicate BIO_R_PORT_MISMATCH * reorder/sort 3 things * update copyright year from 2022 to 2025 see #27183 CLA: trivial Reviewed-by: Saša Nedvědický Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/27191) --- diff --git a/crypto/bio/bio_err.c b/crypto/bio/bio_err.c index 6fe295ee52f..d5529d8e225 100644 --- a/crypto/bio/bio_err.c +++ b/crypto/bio/bio_err.c @@ -97,18 +97,3 @@ int ossl_err_load_BIO_strings(void) #endif return 1; } - -#ifndef OPENSSL_NO_SOCK - -int BIO_err_is_non_fatal(unsigned int errcode) -{ - if (ERR_SYSTEM_ERROR(errcode)) - return BIO_sock_non_fatal_error(ERR_GET_REASON(errcode)); - else if (ERR_GET_LIB(errcode) == ERR_LIB_BIO - && ERR_GET_REASON(errcode) == BIO_R_NON_FATAL) - return 1; - else - return 0; -} - -#endif diff --git a/crypto/bio/bio_lib.c b/crypto/bio/bio_lib.c index 85ab4afe182..66e575a837c 100644 --- a/crypto/bio/bio_lib.c +++ b/crypto/bio/bio_lib.c @@ -1080,3 +1080,18 @@ int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds) return rv; } + +#ifndef OPENSSL_NO_SOCK + +int BIO_err_is_non_fatal(unsigned int errcode) +{ + if (ERR_SYSTEM_ERROR(errcode)) + return BIO_sock_non_fatal_error(ERR_GET_REASON(errcode)); + else if (ERR_GET_LIB(errcode) == ERR_LIB_BIO + && ERR_GET_REASON(errcode) == BIO_R_NON_FATAL) + return 1; + else + return 0; +} + +#endif