From: Steffan Karger Date: Thu, 7 Jan 2016 20:22:12 +0000 (+0100) Subject: polarssl: use wrappers to access md_info_t member functions X-Git-Tag: v2.4_alpha1~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=072fdcd00688d2d16d17745fb7d7b385795d5de1;p=thirdparty%2Fopenvpn.git polarssl: use wrappers to access md_info_t member functions The md_info_t will become an opaque struct in mbed TLS 2.x, start using the wrapper function in preparation to a future upgrade to 2.x. Signed-off-by: Steffan Karger Acked-by: Gert Doering Message-Id: <1452198132-25560-1-git-send-email-steffan@karger.me> URL: http://article.gmane.org/gmane.network.openvpn.devel/10955 Signed-off-by: Gert Doering --- diff --git a/src/openvpn/crypto_polarssl.c b/src/openvpn/crypto_polarssl.c index 92fdb787a..f0ad81a07 100644 --- a/src/openvpn/crypto_polarssl.c +++ b/src/openvpn/crypto_polarssl.c @@ -214,7 +214,7 @@ show_available_digests () if (info) printf ("%s %d bit default key\n", - info->name, info->size * 8); + md_get_name(info), md_get_size(info) * 8); digests++; } printf ("\n"); @@ -578,10 +578,10 @@ md_kt_get (const char *digest) md = md_info_from_string(digest); if (!md) msg (M_FATAL, "Message hash algorithm '%s' not found", digest); - if (md->size > MAX_HMAC_KEY_LENGTH) + if (md_get_size(md) > MAX_HMAC_KEY_LENGTH) msg (M_FATAL, "Message hash algorithm '%s' uses a default hash size (%d bytes) which is larger than " PACKAGE_NAME "'s current maximum hash size (%d bytes)", digest, - md->size, + md_get_size(md), MAX_HMAC_KEY_LENGTH); return md; }