From 6d3202e20f73f8d368004a90d743a613b51f0d62 Mon Sep 17 00:00:00 2001 From: dare3path Date: Fri, 28 Mar 2025 07:54:55 +0100 Subject: [PATCH] move BIO_err_is_non_fatal() to bio_lib.c MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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) --- crypto/bio/bio_err.c | 15 --------------- crypto/bio/bio_lib.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) 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 -- 2.47.2