From 08daebb4107416703be9ead75dd4c1c1bd1b0d36 Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Mon, 10 Jul 2023 10:36:48 +0800 Subject: [PATCH] Make endpoint getter parameter a pointer to const It would be convenient for users to query the endpoint type directly from a ssl context: ``` mbedtls_ssl_conf_get_endpoint( mbedtls_ssl_context_get_config(&ssl)) ``` Signed-off-by: Pengyu Lv --- include/mbedtls/ssl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index 4d86525256..7b11e51099 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -1926,7 +1926,7 @@ void mbedtls_ssl_conf_endpoint(mbedtls_ssl_config *conf, int endpoint); * \return Endpoint type, either MBEDTLS_SSL_IS_CLIENT * or MBEDTLS_SSL_IS_SERVER */ -static inline int mbedtls_ssl_conf_get_endpoint(mbedtls_ssl_config *conf) +static inline int mbedtls_ssl_conf_get_endpoint(const mbedtls_ssl_config *conf) { return conf->MBEDTLS_PRIVATE(endpoint); }