From 2088e2ebd9bef9eac9b7b5909234f9d498b8c8c3 Mon Sep 17 00:00:00 2001 From: Nicholas Wilson Date: Tue, 8 Sep 2015 16:53:18 +0100 Subject: [PATCH] fix const-ness of argument to mbedtls_ssl_conf_cert_profile Otherwise, it's impossible to pass in a pointer to mbedtls_x509_crt_profile_next! --- include/mbedtls/ssl.h | 2 +- library/ssl_tls.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index bd88918ca..907bba181 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -1381,7 +1381,7 @@ void mbedtls_ssl_conf_ciphersuites_for_version( mbedtls_ssl_config *conf, * \param profile Profile to use */ void mbedtls_ssl_conf_cert_profile( mbedtls_ssl_config *conf, - mbedtls_x509_crt_profile *profile ); + const mbedtls_x509_crt_profile *profile ); /** * \brief Set the data required to verify peer certificate diff --git a/library/ssl_tls.c b/library/ssl_tls.c index 14ee521ca..f1d2dd201 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -5372,7 +5372,7 @@ void mbedtls_ssl_conf_ciphersuites_for_version( mbedtls_ssl_config *conf, #if defined(MBEDTLS_X509_CRT_PARSE_C) void mbedtls_ssl_conf_cert_profile( mbedtls_ssl_config *conf, - mbedtls_x509_crt_profile *profile ) + const mbedtls_x509_crt_profile *profile ) { conf->cert_profile = profile; }