From 10b400bd6896643fd3bd4c96a934221fcdd42ce6 Mon Sep 17 00:00:00 2001 From: Andrzej Kurek Date: Tue, 3 Apr 2018 08:55:18 -0400 Subject: [PATCH] Add changelog entry regarding the pre-verify callback Fix minor typos --- ChangeLog | 4 +++- include/mbedtls/ssl.h | 6 +++--- library/ssl_tls.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index c0759b2b2..95383abd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,9 @@ Changes * Remove some redundant code in bignum.c. Contributed by Alexey Skalozub. * Support cmake build where Mbed TLS is a subproject. Fix contributed independently by Matthieu Volat and Arne Schwabe. - + * Add a pre-verify callback to ssl.h to receive notification before + the X.509 chain building. Contributed by Nick Wilson. + = mbed TLS 2.8.0 branch released 2018-03-16 Default behavior changes diff --git a/include/mbedtls/ssl.h b/include/mbedtls/ssl.h index fa5ae2f3b..131e4ba2d 100644 --- a/include/mbedtls/ssl.h +++ b/include/mbedtls/ssl.h @@ -636,11 +636,11 @@ struct mbedtls_ssl_config #if defined(MBEDTLS_X509_CRT_PARSE_C) /** Callback to receive notification before X.509 chain building */ mbedtls_ssl_pre_verify_t *f_pre_vrfy; - void *p_pre_vrfy; /*!< context for pre-verify calllback */ + void *p_pre_vrfy; /*!< context for pre-verify callback */ /** Callback to customize X.509 certificate chain verification */ int (*f_vrfy)(void *, mbedtls_x509_crt *, int, uint32_t *); - void *p_vrfy; /*!< context for X.509 verify calllback */ + void *p_vrfy; /*!< context for X.509 verify callback */ #endif #if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) @@ -1104,7 +1104,7 @@ void mbedtls_ssl_conf_verify( mbedtls_ssl_config *conf, */ void mbedtls_ssl_conf_pre_verify( mbedtls_ssl_config *conf, mbedtls_ssl_pre_verify_t *f_pre_vrfy, - void *p_pre_vrfy); + void *p_pre_vrfy ); #endif /* MBEDTLS_X509_CRT_PARSE_C */ /** diff --git a/library/ssl_tls.c b/library/ssl_tls.c index c87b37019..b2bb96459 100644 --- a/library/ssl_tls.c +++ b/library/ssl_tls.c @@ -5888,8 +5888,8 @@ void mbedtls_ssl_conf_pre_verify( mbedtls_ssl_config *conf, mbedtls_ssl_pre_verify_t *f_pre_vrfy, void *p_pre_vrfy) { - conf->f_pre_vrfy = f_pre_vrfy; - conf->p_pre_vrfy = p_pre_vrfy; + conf->f_pre_vrfy = f_pre_vrfy; + conf->p_pre_vrfy = p_pre_vrfy; } #endif /* MBEDTLS_X509_CRT_PARSE_C */