Commit bd77254b authored by Manuel Pégourié-Gonnard's avatar Manuel Pégourié-Gonnard
Browse files

md_list() starting with strongest hash

parent 6697b6c1
...@@ -30,6 +30,7 @@ Changes ...@@ -30,6 +30,7 @@ Changes
required on some platforms (e.g. OpenBSD) required on some platforms (e.g. OpenBSD)
* Migrate zeroizing of data to polarssl_zeroize() instead of memset() * Migrate zeroizing of data to polarssl_zeroize() instead of memset()
against unwanted compiler optimizations against unwanted compiler optimizations
* md_list() now returns hashes strongest first
Bugfix Bugfix
* Fix in debug_print_msg() * Fix in debug_print_msg()
......
...@@ -52,37 +52,37 @@ static void polarssl_zeroize( void *v, size_t n ) { ...@@ -52,37 +52,37 @@ static void polarssl_zeroize( void *v, size_t n ) {
static const int supported_digests[] = { static const int supported_digests[] = {
#if defined(POLARSSL_MD2_C) #if defined(POLARSSL_SHA512_C)
POLARSSL_MD_MD2, POLARSSL_MD_SHA384,
POLARSSL_MD_SHA512,
#endif #endif
#if defined(POLARSSL_MD4_C) #if defined(POLARSSL_SHA256_C)
POLARSSL_MD_MD4, POLARSSL_MD_SHA224,
POLARSSL_MD_SHA256,
#endif #endif
#if defined(POLARSSL_MD5_C) #if defined(POLARSSL_SHA1_C)
POLARSSL_MD_MD5, POLARSSL_MD_SHA1,
#endif #endif
#if defined(POLARSSL_RIPEMD160_C) #if defined(POLARSSL_RIPEMD160_C)
POLARSSL_MD_RIPEMD160, POLARSSL_MD_RIPEMD160,
#endif #endif
#if defined(POLARSSL_SHA1_C) #if defined(POLARSSL_MD5_C)
POLARSSL_MD_SHA1, POLARSSL_MD_MD5,
#endif #endif
#if defined(POLARSSL_SHA256_C) #if defined(POLARSSL_MD4_C)
POLARSSL_MD_SHA224, POLARSSL_MD_MD4,
POLARSSL_MD_SHA256,
#endif #endif
#if defined(POLARSSL_SHA512_C) #if defined(POLARSSL_MD2_C)
POLARSSL_MD_SHA384, POLARSSL_MD_MD2,
POLARSSL_MD_SHA512,
#endif #endif
0 POLARSSL_MD_NONE
}; };
const int *md_list( void ) const int *md_list( void )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment