From 2a8afa98e250b913b47b7b9157137c1954be4ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 12 Jun 2014 12:00:44 +0200 Subject: [PATCH] pkcs5_self_test depends on SHA1 --- library/pkcs5.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/library/pkcs5.c b/library/pkcs5.c index 8f6a814dc..424952ab9 100644 --- a/library/pkcs5.c +++ b/library/pkcs5.c @@ -295,6 +295,16 @@ int pkcs5_pbkdf2_hmac( md_context_t *ctx, const unsigned char *password, #if defined(POLARSSL_SELF_TEST) +#if !defined(POLARSSL_SHA1_C) +int pkcs5_self_test( int verbose ) +{ + if( verbose != 0 ) + polarssl_printf( " PBKDF2 (SHA1): skipped\n\n" ); + + return( 0 ); +} +#else + #include #define MAX_TESTS 6 @@ -398,6 +408,7 @@ int pkcs5_self_test( int verbose ) return( 0 ); } +#endif /* POLARSSL_SHA1_C */ #endif /* POLARSSL_SELF_TEST */