]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
move BIO_err_is_non_fatal() to bio_lib.c
authordare3path <dare3path@tuta.io>
Fri, 28 Mar 2025 06:54:55 +0000 (07:54 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 1 Apr 2025 16:56:13 +0000 (18:56 +0200)
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ý <sashan@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27191)

crypto/bio/bio_err.c
crypto/bio/bio_lib.c

index 6fe295ee52f2d073e365c26a852f3d609055af28..d5529d8e2252ca5723e61d7a528ea6b7a33684df 100644 (file)
@@ -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
index 85ab4afe182a27f2c19262f3d5c2f31f9a3717ae..66e575a837c9787336da9386cbc89bce8c3a31c3 100644 (file)
@@ -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