summaryrefslogtreecommitdiff
path: root/bufferevent_mbedtls.c
diff options
context:
space:
mode:
authorWilliam Marlow <william.marlow@ibm.com>2022-06-23 23:06:14 +0100
committerAzat Khuzhin <azat@libevent.org>2022-07-09 20:47:04 +0300
commit384c52e6be5463e68662581dc94247fb40a18aa0 (patch)
tree7203512b8502c11674a90702a16360dee8b097a6 /bufferevent_mbedtls.c
parent35e12a817530b665f508ebc832d944b7b0b2b63c (diff)
downloadlibevent-384c52e6be5463e68662581dc94247fb40a18aa0.tar.gz
Initial Mbed-TLS 3 support to get the GitHub Actions working again
mingw has upgraded to Mbed-TLS 3.1.0, so all the mingw tests that need Mbed-TLS currently don't work. v2: add missing mbedtls/version.h into test/regress_mbedtls.c v3: suppress #warning "Including compat-2.x.h is deprecated" for mbedtls/compat-2.x.h
Diffstat (limited to 'bufferevent_mbedtls.c')
-rw-r--r--bufferevent_mbedtls.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bufferevent_mbedtls.c b/bufferevent_mbedtls.c
index f42da2ae..ca96f723 100644
--- a/bufferevent_mbedtls.c
+++ b/bufferevent_mbedtls.c
@@ -24,8 +24,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
+/* Mbed-TLS 3.x does not currently expose a function to retrieve
+ the bio parameters from the SSL object. When the above issue has been
+ fixed, remove the MBEDTLS_ALLOW_PRIVATE_ACCESS define and use the
+ appropriate getter function in bufferevent_mbedtls_socket_new rather than
+ accessing the struct fields directly. */
+#define MBEDTLS_ALLOW_PRIVATE_ACCESS
#include "mbedtls-compat.h"
-#include <mbedtls/config.h>
+#include <mbedtls/version.h>
#include <mbedtls/ssl.h>
#include <mbedtls/error.h>