Fix compilation on pre-EKM mbedTLS libraries.
A message that is not in the archive (sent off-list or not yet received): [email protected]...
PATCH v2 1/1 Fix compilation on pre-EKM mbedTLS libraries.
commit f0734e49956217 simplified key_state_export_keying_material(), changing the function prototype. For older mbedTLS versions, there is an "always fail" dummy function which was overlooked in that change.
Fix prototype.
v2: also adjust function return (NULL -> false)
--- src/openvpn/ssl_mbedtls.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
src/openvpn/ssl_mbedtls.c +3 -4
@@ -252,14 +252,13 @@ key_state_export_keying_material(struct tls_session *session, } }#else -unsigned char * +bool key_state_export_keying_material (struct tls_session *session,const char * label,size_t label_size, -size_t ekm_size, -struct gc_arena *gc) +void *ekm,size_t ekm_size) {/* Dummy function to avoid ifdefs in the common code */ -return NULL ; +return false; }#endif /* HAVE_EXPORT_KEYING_MATERIAL */
Signature · 1 line
2.22.0
Hi,
Quoted 26 lines · Gert Doering
commit
f0734e49956217simplifiedkey_state_export_keying_material(), changing the function prototype. For older mbedTLS versions, there is an "always fail" dummy function which was overlooked in that change.Fix prototype.
v2: also adjust function return (NULL -> false)
Signed-off-by Gert Doering <[email protected]...>--- src/openvpn/ssl_mbedtls.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)src/openvpn/ssl_mbedtls.c +1
-1@@ -252,14 +252,13 @@ key_state_export_keying_material(struct tls_session *session, } }#else -unsigned char * +bool key_state_export_keying_material(struct tls_session *session, const char* label, size_t label_size,
src/openvpn/ssl_mbedtls.c key_state_export_keying_material(struct tls_session *session, · line 264
Quoted 10 lines
src/openvpn/ssl_mbedtls.c +2
-3- size_t ekm_size, - struct gc_arena *gc) + void *ekm, size_t ekm_size) {/* Dummy function to avoid ifdefs in the common code */ -return NULL ; +return false; }#endif /* HAVE_EXPORT_KEYING_MATERIAL */
Sorry, totally missed this. Fix looks good.
-Steffan
Patch has been applied to the master branch.
commit 14bd92b7e4a698678200f439ddda1ee321bb8ee8
Author: Gert Doering Date: Sat Oct 10 10:14:35 2020 +0200
Fix compilation on pre-EKM mbedTLS libraries.
Signed-off-by: Gert Doering <[email protected]...>
Acked-by: Steffan Karger <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg21198.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering