Skip to content

Commit f02fa33

Browse files
committed
Support disabled renegotiation in mbedTLS
Patch from: @Kurruk007 Fixes: libevent#1161
1 parent 7213806 commit f02fa33

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bufferevent_mbedtls.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
*/
2626

2727
#include "mbedtls-compat.h"
28+
#include <mbedtls/config.h>
2829
#include <mbedtls/ssl.h>
2930
#include <mbedtls/error.h>
3031

@@ -63,8 +64,12 @@ mbedtls_context_free(void *ssl, int flags)
6364
static int
6465
mbedtls_context_renegotiate(void *ssl)
6566
{
67+
#ifdef MBEDTLS_SSL_RENEGOTIATION
6668
struct mbedtls_context *ctx = ssl;
6769
return mbedtls_ssl_renegotiate(ctx->ssl);
70+
#else
71+
return MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE;
72+
#endif
6873
}
6974
static int
7075
mbedtls_context_write(void *ssl, const unsigned char *buf, size_t len)

0 commit comments

Comments
 (0)