allow examples build if no-sha but psk is on

pull/61/head
toddouska 2015-03-28 14:58:17 -07:00
parent 27faf15678
commit 9ba62a2c52
2 changed files with 4 additions and 2 deletions

View File

@ -1695,7 +1695,7 @@ AC_ARG_ENABLE([examples],
AS_IF([test "x$ENABLED_FILESYSTEM" = "xno"], [ENABLED_EXAMPLES="no"])
AS_IF([test "x$ENABLED_INLINE" = "xno"], [ENABLED_EXAMPLES="no"])
# certs still have sha signatures for now
AS_IF([test "x$ENABLED_SHA" = "xno"], [ENABLED_EXAMPLES="no"])
AS_IF([test "x$ENABLED_SHA" = "xno" && test"x$ENABLED_PSK" = "xno"], [ENABLED_EXAMPLES="no"])
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"])

View File

@ -127,10 +127,12 @@ int HashTest(void)
printf( " HMAC-MD5 test passed!\n");
#endif
#ifndef NO_SHA
if ( (ret = hmac_sha_test()) )
printf( " HMAC-SHA test failed!\n");
else
printf( " HMAC-SHA test passed!\n");
#endif
#ifndef NO_SHA256
if ( (ret = hmac_sha256_test()) )
@ -631,7 +633,7 @@ int hmac_md5_test(void)
}
#endif
#ifndef NO_HMAC
#if !defined(NO_HMAC) && !defined(NO_SHA)
int hmac_sha_test(void)
{
Hmac hmac;