rsaenh: Cast-qual warnings fix.
This commit is contained in:
parent
1e1d107397
commit
b3be5bcd1c
|
@ -3331,7 +3331,7 @@ error:
|
|||
|
||||
/* reads an unsigned char array, assumes the msb is stored first [big endian] */
|
||||
int
|
||||
mp_read_unsigned_bin (mp_int * a, unsigned char *b, int c)
|
||||
mp_read_unsigned_bin (mp_int * a, const unsigned char *b, int c)
|
||||
{
|
||||
int res;
|
||||
|
||||
|
|
|
@ -196,8 +196,8 @@ int rsa_exptmod(const unsigned char *in, unsigned long inlen,
|
|||
}
|
||||
|
||||
/* init and copy into tmp */
|
||||
if ((err = mp_init_multi(&tmp, &tmpa, &tmpb, NULL)) != MP_OKAY) { return mpi_to_ltc_error(err); }
|
||||
if ((err = mp_read_unsigned_bin(&tmp, (unsigned char *)in, (int)inlen)) != MP_OKAY) { goto error; }
|
||||
if ((err = mp_init_multi(&tmp, &tmpa, &tmpb, NULL)) != MP_OKAY) { return mpi_to_ltc_error(err); }
|
||||
if ((err = mp_read_unsigned_bin(&tmp, in, (int)inlen)) != MP_OKAY) { goto error; }
|
||||
|
||||
/* sanity check on the input */
|
||||
if (mp_cmp(&key->N, &tmp) == MP_LT) {
|
||||
|
|
|
@ -545,7 +545,7 @@ int mp_prime_random_ex(mp_int *a, int t, int size, int flags, ltm_prime_callback
|
|||
int mp_count_bits(mp_int *a);
|
||||
|
||||
int mp_unsigned_bin_size(mp_int *a);
|
||||
int mp_read_unsigned_bin(mp_int *a, unsigned char *b, int c);
|
||||
int mp_read_unsigned_bin(mp_int *a, const unsigned char *b, int c);
|
||||
int mp_to_unsigned_bin(mp_int *a, unsigned char *b);
|
||||
|
||||
int mp_signed_bin_size(mp_int *a);
|
||||
|
|
Loading…
Reference in New Issue