diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-06-07 16:25:01 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2018-06-07 18:50:44 +0200 |
commit | 888379e5131c34278c26c4696918a6cdcebc886b (patch) | |
tree | 276ec9cdaa0b97444e4a86000de73907f25ef142 /thirdparty/mbedtls/library/ssl_cookie.c | |
parent | 9d23f1bf1a5b8c1b17a69d928834f92635eedd78 (diff) |
Bump mbedTLS to version 2.10.0
Diffstat (limited to 'thirdparty/mbedtls/library/ssl_cookie.c')
-rw-r--r-- | thirdparty/mbedtls/library/ssl_cookie.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/thirdparty/mbedtls/library/ssl_cookie.c b/thirdparty/mbedtls/library/ssl_cookie.c index caf119990d..56e9bdd2bf 100644 --- a/thirdparty/mbedtls/library/ssl_cookie.c +++ b/thirdparty/mbedtls/library/ssl_cookie.c @@ -40,14 +40,10 @@ #include "mbedtls/ssl_cookie.h" #include "mbedtls/ssl_internal.h" +#include "mbedtls/platform_util.h" #include <string.h> -/* Implementation that should never be optimized out by the compiler */ -static void mbedtls_zeroize( void *v, size_t n ) { - volatile unsigned char *p = v; while( n-- ) *p++ = 0; -} - /* * If DTLS is in use, then at least one of SHA-1, SHA-256, SHA-512 is * available. Try SHA-256 first, 512 wastes resources since we need to stay @@ -101,7 +97,7 @@ void mbedtls_ssl_cookie_free( mbedtls_ssl_cookie_ctx *ctx ) mbedtls_mutex_free( &ctx->mutex ); #endif - mbedtls_zeroize( ctx, sizeof( mbedtls_ssl_cookie_ctx ) ); + mbedtls_platform_zeroize( ctx, sizeof( mbedtls_ssl_cookie_ctx ) ); } int mbedtls_ssl_cookie_setup( mbedtls_ssl_cookie_ctx *ctx, @@ -122,7 +118,7 @@ int mbedtls_ssl_cookie_setup( mbedtls_ssl_cookie_ctx *ctx, if( ret != 0 ) return( ret ); - mbedtls_zeroize( key, sizeof( key ) ); + mbedtls_platform_zeroize( key, sizeof( key ) ); return( 0 ); } |