rsaenh: Cast-qual warnings fix (1 of 2)

Andrew Talbot Andrew.Talbot at talbotville.com
Tue Sep 26 16:06:33 CDT 2006


Changelog:
    rsaenh: Cast-qual warnings fix.

diff -urN a/dlls/rsaenh/mpi.c b/dlls/rsaenh/mpi.c
--- a/dlls/rsaenh/mpi.c	2006-05-23 13:48:34.000000000 +0100
+++ b/dlls/rsaenh/mpi.c	2006-09-26 21:41:59.000000000 +0100
@@ -3331,7 +3331,7 @@
 
 /* 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;
 
diff -urN a/dlls/rsaenh/rsa.c b/dlls/rsaenh/rsa.c
--- a/dlls/rsaenh/rsa.c	2006-05-23 13:48:34.000000000 +0100
+++ b/dlls/rsaenh/rsa.c	2006-09-26 21:43:32.000000000 +0100
@@ -196,8 +196,8 @@
    }
 
    /* 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) {
diff -urN a/dlls/rsaenh/tomcrypt.h b/dlls/rsaenh/tomcrypt.h
--- a/dlls/rsaenh/tomcrypt.h	2006-05-23 13:48:34.000000000 +0100
+++ b/dlls/rsaenh/tomcrypt.h	2006-09-26 21:40:45.000000000 +0100
@@ -545,7 +545,7 @@
 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);



More information about the wine-patches mailing list