fix dsa_int_validate_key related compiler warnings
This commit is contained in:
parent
1625ce4001
commit
aa5b9dafc4
@ -480,7 +480,7 @@ int dsa_import(const unsigned char *in, unsigned long inlen, dsa_key *key);
|
||||
int dsa_export(unsigned char *out, unsigned long *outlen, int type, dsa_key *key);
|
||||
int dsa_verify_key(dsa_key *key, int *stat);
|
||||
#ifdef LTC_SOURCE
|
||||
int dsa_int_validate_key(dsa_key *key, int *stat, int mode);
|
||||
int dsa_int_validate_key(dsa_key *key, int *stat);
|
||||
#endif
|
||||
int dsa_shared_secret(void *private_key, void *base,
|
||||
dsa_key *public_key,
|
||||
|
@ -90,7 +90,8 @@ int dsa_set_key(const unsigned char *in, unsigned long inlen, int type, dsa_key
|
||||
if ((err = mp_read_unsigned_bin(key->y, (unsigned char *)in, inlen)) != CRYPT_OK) { goto LBL_ERR; }
|
||||
}
|
||||
|
||||
if ((err = dsa_int_validate_key(key, &stat, 0)) != CRYPT_OK) { goto LBL_ERR; }
|
||||
/* do only a quick validation, without primality testing */
|
||||
if ((err = dsa_int_validate_key(key, &stat)) != CRYPT_OK) { goto LBL_ERR; }
|
||||
if (stat == 0) {
|
||||
err = CRYPT_INVALID_ARG;
|
||||
goto LBL_ERR;
|
||||
|
@ -51,7 +51,7 @@ int dsa_verify_key(dsa_key *key, int *stat)
|
||||
return CRYPT_OK;
|
||||
}
|
||||
|
||||
return dsa_int_validate_key(key, stat); /* 1 = full check */
|
||||
return dsa_int_validate_key(key, stat);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -67,7 +67,7 @@ int dsa_verify_key(dsa_key *key, int *stat)
|
||||
int dsa_int_validate_key(dsa_key *key, int *stat)
|
||||
{
|
||||
void *tmp, *tmp2;
|
||||
int res, err;
|
||||
int err;
|
||||
|
||||
LTC_ARGCHK(key != NULL);
|
||||
LTC_ARGCHK(stat != NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user