account for NO_RSA and SP math when printing max RSA key size

This commit is contained in:
Jacob Barthelmeh
2018-08-15 09:50:50 -06:00
parent c3ab52ed44
commit 373258a0c2

View File

@ -722,8 +722,18 @@ static void Usage(void)
" NOTE: All files relative to wolfSSL home dir\n");
/* print out so that scripts can know what the max supported key size is */
printf("Max key size in bits for build is set at : ");
#ifdef USE_FAST_MATH
printf("Max RSA key size in bits for build is set at : ");
#ifdef NO_RSA
printf("RSA not supported\n");
#elif defined(WOLFSSL_SP_MATH) /* case of SP math only */
#ifndef WOLFSSL_SP_NO_3072
printf("3072\n");
#elif !defined(WOLFSSL_SP_NO_2048)
printf("2048\n");
#else
printf("0\n");
#endif
#elif defined(USE_FAST_MATH)
printf("%d\n", FP_MAX_BITS/2);
#else
/* normal math has unlimited max size */