Move WOLFSSL_-prefixed BIO type and TLS state constants out of coexist guards

This commit is contained in:
Takashi Kojo
2026-08-08 18:10:00 +09:00
parent 39aad36963
commit c841626bfa
3 changed files with 12 additions and 17 deletions
-6
View File
@@ -2119,12 +2119,6 @@ long wolfSSL_BIO_set_nbio(WOLFSSL_BIO* bio, long on)
return WOLFSSL_SUCCESS;
}
#ifndef WOLFSSL_BIO_TYPE_START
/* Matches WOLFSSL_BIO_TYPE_START in wolfssl/openssl/bio.h (OpenSSL's
* BIO_TYPE_START), which is only included with OPENSSL_EXTRA. */
#define WOLFSSL_BIO_TYPE_START 128
#endif
/* Return a new type index for a custom BIO, starting at
* WOLFSSL_BIO_TYPE_START like OpenSSL's BIO_get_new_index().
* Thread-safe when atomic operations are available; otherwise falls
+6 -6
View File
@@ -75,6 +75,12 @@
#define WOLFSSL_BIO_FP_WRITE 0x04
#define WOLFSSL_BIO_TYPE_DESCRIPTOR 0x0100
#define WOLFSSL_BIO_TYPE_SOURCE_SINK 0x0400
/* Application BIO type indexes are handed out starting after this value
* by wolfSSL_BIO_get_new_index(), like OpenSSL's BIO_TYPE_START. */
#define WOLFSSL_BIO_TYPE_START 128
#ifndef OPENSSL_COEXIST
#define BIO_FLAGS_BASE64_NO_NL WOLFSSL_BIO_FLAG_BASE64_NO_NL
@@ -188,12 +194,6 @@
#define BIO_meth_set_create wolfSSL_BIO_meth_set_create
#define BIO_meth_set_destroy wolfSSL_BIO_meth_set_destroy
#define WOLFSSL_BIO_TYPE_DESCRIPTOR 0x0100
#define WOLFSSL_BIO_TYPE_SOURCE_SINK 0x0400
/* Application BIO type indexes are handed out starting after this value
* by wolfSSL_BIO_get_new_index(), like OpenSSL's BIO_TYPE_START. */
#define WOLFSSL_BIO_TYPE_START 128
#define BIO_TYPE_DESCRIPTOR WOLFSSL_BIO_TYPE_DESCRIPTOR
#define BIO_TYPE_SOURCE_SINK WOLFSSL_BIO_TYPE_SOURCE_SINK
#define BIO_TYPE_START WOLFSSL_BIO_TYPE_START
+6 -5
View File
@@ -130,6 +130,12 @@
HAVE_LIGHTY || HAVE_STUNNEL || \
WOLFSSL_WPAS_SMALL */
/* Must equal HANDSHAKE_DONE in the internal 'enum states'
* (wolfssl/internal.h), returned by wolfSSL_get_state(); enforced by a
* wc_static_assert in src/ssl.c. */
#define WOLFSSL_TLS_ST_OK 16
#define WOLFSSL_SSL_ST_OK WOLFSSL_TLS_ST_OK
#if !defined(OPENSSL_COEXIST) && \
(defined(OPENSSL_EXTRA) || defined(OPENSSL_EXTRA_X509_SMALL))
@@ -1583,11 +1589,6 @@ typedef WOLFSSL_SRTP_PROTECTION_PROFILE SRTP_PROTECTION_PROFILE;
#define SSL_get_state wolfSSL_get_state
#define SSL_state_string_long wolfSSL_state_string_long
/* Must equal HANDSHAKE_DONE in the internal 'enum states'
* (wolfssl/internal.h), returned by wolfSSL_get_state(); enforced by a
* wc_static_assert in src/ssl.c. */
#define WOLFSSL_TLS_ST_OK 16
#define WOLFSSL_SSL_ST_OK WOLFSSL_TLS_ST_OK
#define TLS_ST_OK WOLFSSL_TLS_ST_OK
#define SSL_ST_OK WOLFSSL_SSL_ST_OK
#define SSL_F_SSL_SET_FD WOLFSSL_SSL_F_SSL_SET_FD