From 9395298d12bc197a6fd69c987edb2ec49873887b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 20 Mar 2015 18:19:32 +0000 Subject: [PATCH 1/2] Fix use of deprecated function in the library --- library/hmac_drbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/hmac_drbg.c b/library/hmac_drbg.c index fed297f29..c7904d069 100644 --- a/library/hmac_drbg.c +++ b/library/hmac_drbg.c @@ -314,7 +314,7 @@ void hmac_drbg_free( hmac_drbg_context *ctx ) if( ctx == NULL ) return; - md_free_ctx( &ctx->md_ctx ); + md_free( &ctx->md_ctx ); polarssl_zeroize( ctx, sizeof( hmac_drbg_context ) ); } From 079333bf7774d5bcb037e2f5f7f3fca5bc4c1dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 20 Mar 2015 18:14:26 +0000 Subject: [PATCH 2/2] Fix use of deprecated function in test --- tests/suites/test_suite_x509parse.function | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/suites/test_suite_x509parse.function b/tests/suites/test_suite_x509parse.function index 50de457b0..69594846c 100644 --- a/tests/suites/test_suite_x509parse.function +++ b/tests/suites/test_suite_x509parse.function @@ -346,8 +346,9 @@ exit: void x509_oid_desc( char *oid_str, char *ref_desc ) { x509_buf oid; - const char *desc; + const char *desc = NULL; unsigned char buf[20]; + int ret; memset( buf, 0, sizeof buf ); @@ -355,12 +356,16 @@ void x509_oid_desc( char *oid_str, char *ref_desc ) oid.len = unhexify( buf, oid_str ); oid.p = buf; - desc = x509_oid_get_description( &oid ); + ret = oid_get_extended_key_usage( &oid, &desc ); if( strcmp( ref_desc, "notfound" ) == 0 ) + { + TEST_ASSERT( ret != 0 ); TEST_ASSERT( desc == NULL ); + } else { + TEST_ASSERT( ret == 0 ); TEST_ASSERT( desc != NULL ); TEST_ASSERT( strcmp( desc, ref_desc ) == 0 ); } @@ -383,7 +388,7 @@ void x509_oid_numstr( char *oid_str, char *numstr, int blen, int ret ) TEST_ASSERT( (size_t) blen <= sizeof num_buf ); - TEST_ASSERT( x509_oid_get_numeric_string( num_buf, blen, &oid ) == ret ); + TEST_ASSERT( oid_get_numeric_string( num_buf, blen, &oid ) == ret ); if( ret >= 0 ) {