diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 5ce118c20..2642ac65b 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -1214,6 +1214,12 @@ void ssl_set_dbg( ssl_context *ssl, void (*f_dbg)(void *, int, const char *), void *p_dbg ); +#if ! defined(POLARSSL_DEPRECATED_REMOVED) +#if defined(POLARSSL_DEPRECATED_WARNING) +#define DEPRECATED __attribute__((deprecated)) +#else +#define DEPRECATED +#endif /** * \brief Set the underlying BIO read and write callbacks * @@ -1231,7 +1237,9 @@ void ssl_set_dbg( ssl_context *ssl, */ void ssl_set_bio( ssl_context *ssl, int (*f_recv)(void *, unsigned char *, size_t), void *p_recv, - int (*f_send)(void *, const unsigned char *, size_t), void *p_send ); + int (*f_send)(void *, const unsigned char *, size_t), void *p_send ) DEPRECATED; +#undef DEPRECATED +#endif /* POLARSSL_DEPRECATED_REMOVED */ #if defined(POLARSSL_SSL_SRV_C) /** diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 8f635a502..bdc9c534b 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -5257,6 +5257,7 @@ void ssl_set_dbg( ssl_context *ssl, ssl->p_dbg = p_dbg; } +#if ! defined(POLARSSL_DEPRECATED_REMOVED) void ssl_set_bio( ssl_context *ssl, int (*f_recv)(void *, unsigned char *, size_t), void *p_recv, int (*f_send)(void *, const unsigned char *, size_t), void *p_send ) @@ -5273,6 +5274,7 @@ void ssl_set_bio( ssl_context *ssl, ssl->f_send = f_send; ssl->p_bio = p_send; } +#endif /* POLARSSL_DEPRECATED_REMOVED */ void ssl_set_bio_timeout( ssl_context *ssl, void *p_bio,