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/x509write_csr.c | |
parent | 9d23f1bf1a5b8c1b17a69d928834f92635eedd78 (diff) |
Bump mbedTLS to version 2.10.0
Diffstat (limited to 'thirdparty/mbedtls/library/x509write_csr.c')
-rw-r--r-- | thirdparty/mbedtls/library/x509write_csr.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/thirdparty/mbedtls/library/x509write_csr.c b/thirdparty/mbedtls/library/x509write_csr.c index e80053828f..66cee56014 100644 --- a/thirdparty/mbedtls/library/x509write_csr.c +++ b/thirdparty/mbedtls/library/x509write_csr.c @@ -35,6 +35,7 @@ #include "mbedtls/x509_csr.h" #include "mbedtls/oid.h" #include "mbedtls/asn1write.h" +#include "mbedtls/platform_util.h" #include <string.h> #include <stdlib.h> @@ -43,11 +44,6 @@ #include "mbedtls/pem.h" #endif -/* 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; -} - void mbedtls_x509write_csr_init( mbedtls_x509write_csr *ctx ) { memset( ctx, 0, sizeof( mbedtls_x509write_csr ) ); @@ -58,7 +54,7 @@ void mbedtls_x509write_csr_free( mbedtls_x509write_csr *ctx ) mbedtls_asn1_free_named_data_list( &ctx->subject ); mbedtls_asn1_free_named_data_list( &ctx->extensions ); - mbedtls_zeroize( ctx, sizeof( mbedtls_x509write_csr ) ); + mbedtls_platform_zeroize( ctx, sizeof( mbedtls_x509write_csr ) ); } void mbedtls_x509write_csr_set_md_alg( mbedtls_x509write_csr *ctx, mbedtls_md_type_t md_alg ) |