From: Gert Doering Date: Sat, 10 Oct 2020 08:14:35 +0000 (+0200) Subject: Fix compilation on pre-EKM mbedTLS libraries. X-Git-Tag: v2.6_beta1~668 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14bd92b7e4a698678200f439ddda1ee321bb8ee8;p=thirdparty%2Fopenvpn.git 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) Signed-off-by: Gert Doering Acked-by: Steffan Karger Message-Id: <20201010081435.2154-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21198.html Signed-off-by: Gert Doering --- diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c index bb5633b7d..11fbeae47 100644 --- a/src/openvpn/ssl_mbedtls.c +++ b/src/openvpn/ssl_mbedtls.c @@ -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 */