forked from wolfSSL/wolfssl
Fix for missing sp_radix_size
with WC_MP_TO_RADIX
.
This commit is contained in:
@@ -1295,7 +1295,7 @@ static void bench_stats_sym_finish(const char* desc, int doAsync, int count,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* caclulcate blocks per second */
|
/* calculate blocks per second */
|
||||||
if (total > 0) {
|
if (total > 0) {
|
||||||
persec = (1 / total) * blocks;
|
persec = (1 / total) * blocks;
|
||||||
}
|
}
|
||||||
|
@@ -12722,7 +12722,8 @@ int sp_todecimal(sp_int* a, char* str)
|
|||||||
}
|
}
|
||||||
#endif /* WOLFSSL_SP_MATH_ALL || WOLFSSL_KEY_GEN || HAVE_COMP_KEY */
|
#endif /* WOLFSSL_SP_MATH_ALL || WOLFSSL_KEY_GEN || HAVE_COMP_KEY */
|
||||||
|
|
||||||
#if defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)
|
#if (defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) || \
|
||||||
|
defined(WC_MP_TO_RADIX)
|
||||||
/* Put the string version, big-endian, of a in str using the given radix.
|
/* Put the string version, big-endian, of a in str using the given radix.
|
||||||
*
|
*
|
||||||
* @param [in] a SP integer to convert.
|
* @param [in] a SP integer to convert.
|
||||||
@@ -12755,9 +12756,10 @@ int sp_toradix(sp_int* a, char* str, int radix)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_SP_MATH_ALL */
|
#endif /* (WOLFSSL_SP_MATH_ALL && !WOLFSSL_RSA_VERIFY_ONLY) || WC_MP_TO_RADIX */
|
||||||
|
|
||||||
#if defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)
|
#if (defined(WOLFSSL_SP_MATH_ALL) && !defined(WOLFSSL_RSA_VERIFY_ONLY)) || \
|
||||||
|
defined(WC_MP_TO_RADIX)
|
||||||
/* Calculate the length of the string version, big-endian, of a using the given
|
/* Calculate the length of the string version, big-endian, of a using the given
|
||||||
* radix.
|
* radix.
|
||||||
*
|
*
|
||||||
@@ -12848,7 +12850,7 @@ int sp_radix_size(sp_int* a, int radix, int* size)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#endif /* WOLFSSL_SP_MATH_ALL && !WOLFSSL_RSA_VERIFY_ONLY */
|
#endif /* (WOLFSSL_SP_MATH_ALL && !WOLFSSL_RSA_VERIFY_ONLY) || WC_MP_TO_RADIX */
|
||||||
|
|
||||||
/***************************************
|
/***************************************
|
||||||
* Prime number generation and checking.
|
* Prime number generation and checking.
|
||||||
|
@@ -881,7 +881,7 @@ MP_API int sp_to_unsigned_bin_at_pos(int o, sp_int* a, unsigned char* out);
|
|||||||
MP_API int sp_read_radix(sp_int* a, const char* in, int radix);
|
MP_API int sp_read_radix(sp_int* a, const char* in, int radix);
|
||||||
MP_API int sp_tohex(sp_int* a, char* str);
|
MP_API int sp_tohex(sp_int* a, char* str);
|
||||||
MP_API int sp_todecimal(mp_int* a, char* str);
|
MP_API int sp_todecimal(mp_int* a, char* str);
|
||||||
#ifdef WOLFSSL_SP_MATH_ALL
|
#if defined(WOLFSSL_SP_MATH_ALL) || defined(WC_MP_TO_RADIX)
|
||||||
MP_API int sp_toradix(mp_int* a, char* str, int radix);
|
MP_API int sp_toradix(mp_int* a, char* str, int radix);
|
||||||
MP_API int sp_radix_size(mp_int* a, int radix, int* size);
|
MP_API int sp_radix_size(mp_int* a, int radix, int* size);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user