diff --git a/library/bignum_mod.c b/library/bignum_mod.c index dfccaf485..4382bf85a 100644 --- a/library/bignum_mod.c +++ b/library/bignum_mod.c @@ -102,7 +102,7 @@ void mbedtls_mpi_mod_modulus_free( mbedtls_mpi_mod_modulus *m ) } int mbedtls_mpi_mod_modulus_setup( mbedtls_mpi_mod_modulus *m, - mbedtls_mpi_uint *p, + const mbedtls_mpi_uint *p, size_t pn, mbedtls_mpi_mod_ext_rep ext_rep, mbedtls_mpi_mod_rep_selector int_rep ) diff --git a/library/bignum_mod.h b/library/bignum_mod.h index 3712af0f4..d2ba73ecd 100644 --- a/library/bignum_mod.h +++ b/library/bignum_mod.h @@ -53,7 +53,7 @@ typedef void *mbedtls_mpi_mont_struct; typedef void *mbedtls_mpi_opt_red_struct; typedef struct { - mbedtls_mpi_uint *p; + const mbedtls_mpi_uint *p; size_t limbs; // number of limbs size_t bits; // bitlen of p mbedtls_mpi_mod_ext_rep ext_rep; // signals external representation (eg. byte order) @@ -122,7 +122,7 @@ void mbedtls_mpi_mod_modulus_init( mbedtls_mpi_mod_modulus *m ); * invalid. */ int mbedtls_mpi_mod_modulus_setup( mbedtls_mpi_mod_modulus *m, - mbedtls_mpi_uint *p, + const mbedtls_mpi_uint *p, size_t pn, mbedtls_mpi_mod_ext_rep ext_rep, mbedtls_mpi_mod_rep_selector int_rep );