From c07d8634b31ed11e7b1dc5feb368b6402cb23465 Mon Sep 17 00:00:00 2001 From: Marco Oliverio Date: Wed, 8 Apr 2026 18:40:39 +0200 Subject: [PATCH] bio: ABI breaking change: use int instead of byte for type --- src/bio.c | 4 ++-- wolfssl/internal.h | 2 +- wolfssl/ssl.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bio.c b/src/bio.c index 6b225ce198..e35f63fa74 100644 --- a/src/bio.c +++ b/src/bio.c @@ -2093,7 +2093,7 @@ WOLFSSL_BIO_METHOD *wolfSSL_BIO_meth_new(int type, const char *name) return NULL; } XMEMSET(meth, 0, sizeof(WOLFSSL_BIO_METHOD)); - meth->type = (byte)type; + meth->type = type; XSTRNCPY(meth->name, name, MAX_BIO_METHOD_NAME - 1); return meth; @@ -2890,7 +2890,7 @@ int wolfSSL_BIO_flush(WOLFSSL_BIO* bio) DYNAMIC_TYPE_OPENSSL); if (bio) { XMEMSET(bio, 0, sizeof(WOLFSSL_BIO)); - bio->type = (byte)method->type; + bio->type = method->type; #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L bio->method = (WOLFSSL_BIO_METHOD*)method; #else diff --git a/wolfssl/internal.h b/wolfssl/internal.h index 5e512f76eb..7ab8853bdd 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -2819,7 +2819,7 @@ struct WOLFSSL_BIO { } num; int eof; /* eof flag */ int flags; - byte type; /* method type */ + int type; /* method type */ byte init:1; /* bio has been initialized */ byte shutdown:1; /* close flag */ byte connected:1; /* connected state, for datagram BIOs -- as for diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index df5e272365..548b9a45a5 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -783,7 +783,7 @@ typedef long (*wolfssl_BIO_meth_ctrl_info_cb)(WOLFSSL_BIO*, int, wolfSSL_BIO_inf #define MAX_BIO_METHOD_NAME 256 #endif struct WOLFSSL_BIO_METHOD { - byte type; /* method type */ + int type; /* method type */ char name[MAX_BIO_METHOD_NAME]; wolfSSL_BIO_meth_write_cb writeCb; wolfSSL_BIO_meth_read_cb readCb;