diff --git a/ChangeLog b/ChangeLog index a80a85ed1..f4d3fdbbd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ PolarSSL ChangeLog += Version 1.2.16 released 2015-??-?? + +Bugfix + * Fix unused function warning when using MBEDTLS_MDx_ALT or + MBEDTLS_SHAxxx_ALT (found by Henrik) (#239) + = Version 1.2.15 released 2015-08-10 Security diff --git a/library/md2.c b/library/md2.c index 09487e9e7..548d89eec 100644 --- a/library/md2.c +++ b/library/md2.c @@ -36,13 +36,13 @@ #include #endif +#if !defined(POLARSSL_MD2_ALT) + /* Implementation that should never be optimized out by the compiler */ static void polarssl_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0; } -#if !defined(POLARSSL_MD2_ALT) - static const unsigned char PI_SUBST[256] = { 0x29, 0x2E, 0x43, 0xC9, 0xA2, 0xD8, 0x7C, 0x01, 0x3D, 0x36, diff --git a/library/md4.c b/library/md4.c index 6f92f6362..1fba4df84 100644 --- a/library/md4.c +++ b/library/md4.c @@ -36,13 +36,13 @@ #include #endif +#if !defined(POLARSSL_MD4_ALT) + /* Implementation that should never be optimized out by the compiler */ static void polarssl_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0; } -#if !defined(POLARSSL_MD4_ALT) - /* * 32-bit integer manipulation macros (little endian) */ diff --git a/library/md5.c b/library/md5.c index 2dbc2bfef..2259dc69d 100644 --- a/library/md5.c +++ b/library/md5.c @@ -35,13 +35,13 @@ #include #endif +#if !defined(POLARSSL_MD5_ALT) + /* Implementation that should never be optimized out by the compiler */ static void polarssl_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0; } -#if !defined(POLARSSL_MD5_ALT) - /* * 32-bit integer manipulation macros (little endian) */ diff --git a/library/sha1.c b/library/sha1.c index be463df7b..42557419b 100644 --- a/library/sha1.c +++ b/library/sha1.c @@ -35,13 +35,13 @@ #include #endif +#if !defined(POLARSSL_SHA1_ALT) + /* Implementation that should never be optimized out by the compiler */ static void polarssl_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0; } -#if !defined(POLARSSL_SHA1_ALT) - /* * 32-bit integer manipulation macros (big endian) */ diff --git a/library/sha2.c b/library/sha2.c index b41bb235d..7f9b2203c 100644 --- a/library/sha2.c +++ b/library/sha2.c @@ -35,13 +35,13 @@ #include #endif +#if !defined(POLARSSL_SHA2_ALT) + /* Implementation that should never be optimized out by the compiler */ static void polarssl_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0; } -#if !defined(POLARSSL_SHA2_ALT) - /* * 32-bit integer manipulation macros (big endian) */ diff --git a/library/sha4.c b/library/sha4.c index 50987be72..ebdc99734 100644 --- a/library/sha4.c +++ b/library/sha4.c @@ -35,13 +35,13 @@ #include #endif +#if !defined(POLARSSL_SHA4_ALT) + /* Implementation that should never be optimized out by the compiler */ static void polarssl_zeroize( void *v, size_t n ) { volatile unsigned char *p = v; while( n-- ) *p++ = 0; } -#if !defined(POLARSSL_SHA4_ALT) - /* * 64-bit integer manipulation macros (big endian) */