forked from wolfSSL/wolfssl
Fix scan-build warning with "redundant redeclaration of 'fp_isprime'". Changed "fp_isprime" and "fp_isprime_ex" to local static only. Also made "fp_gcd", "fp_lcm", and "fp_randprime" static functions.
This commit is contained in:
@@ -2548,10 +2548,11 @@ int mp_mod_d(fp_int *a, fp_digit b, fp_digit *c)
|
|||||||
|
|
||||||
#ifdef WOLFSSL_KEY_GEN
|
#ifdef WOLFSSL_KEY_GEN
|
||||||
|
|
||||||
void fp_gcd(fp_int *a, fp_int *b, fp_int *c);
|
static void fp_gcd(fp_int *a, fp_int *b, fp_int *c);
|
||||||
void fp_lcm(fp_int *a, fp_int *b, fp_int *c);
|
static void fp_lcm(fp_int *a, fp_int *b, fp_int *c);
|
||||||
int fp_isprime(fp_int *a);
|
static int fp_isprime_ex(fp_int *a, int t);
|
||||||
int fp_randprime(fp_int* N, int len, WC_RNG* rng, void* heap);
|
static int fp_isprime(fp_int *a);
|
||||||
|
static int fp_randprime(fp_int* N, int len, WC_RNG* rng, void* heap);
|
||||||
|
|
||||||
int mp_gcd(fp_int *a, fp_int *b, fp_int *c)
|
int mp_gcd(fp_int *a, fp_int *b, fp_int *c)
|
||||||
{
|
{
|
||||||
|
@@ -518,9 +518,9 @@ int fp_exptmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d);
|
|||||||
|
|
||||||
#define FP_PRIME_SIZE 256
|
#define FP_PRIME_SIZE 256
|
||||||
/* 256 trial divisions + 8 Miller-Rabins, returns FP_YES if probable prime */
|
/* 256 trial divisions + 8 Miller-Rabins, returns FP_YES if probable prime */
|
||||||
int fp_isprime(fp_int *a);
|
/*int fp_isprime(fp_int *a);*/
|
||||||
/* extended version of fp_isprime, do 't' Miller-Rabins instead of only 8 */
|
/* extended version of fp_isprime, do 't' Miller-Rabins instead of only 8 */
|
||||||
int fp_isprime_ex(fp_int *a, int t);
|
/*int fp_isprime_ex(fp_int *a, int t);*/
|
||||||
|
|
||||||
/* Primality generation flags */
|
/* Primality generation flags */
|
||||||
/*#define TFM_PRIME_BBS 0x0001 */ /* BBS style prime */
|
/*#define TFM_PRIME_BBS 0x0001 */ /* BBS style prime */
|
||||||
|
Reference in New Issue
Block a user