From fa8aebcbcc73c7ad316dcd5bd0a2ed3d294936fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 19 Mar 2015 12:47:21 +0000 Subject: [PATCH] Fix a constness issue --- ChangeLog | 1 + include/mbedtls/bignum.h | 2 +- library/bignum.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ae771b05..ecfb0c63c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ Features * Support for DTLS 1.0 and 1.2 (RFC 6347). API Changes + * Some constness fixes * Signature of mpi_mul_mpi() changed to make the last argument unsigned * Remove the PBKDF2 module (use PKCS5). * Remove POLARSSL_ERROR_STRERROR_BC (use mbedtls_strerror()). diff --git a/include/mbedtls/bignum.h b/include/mbedtls/bignum.h index 44248f360..171d42abe 100644 --- a/include/mbedtls/bignum.h +++ b/include/mbedtls/bignum.h @@ -715,7 +715,7 @@ int mpi_inv_mod( mpi *X, const mpi *A, const mpi *N ); * POLARSSL_ERR_MPI_MALLOC_FAILED if memory allocation failed, * POLARSSL_ERR_MPI_NOT_ACCEPTABLE if X is not prime */ -int mpi_is_prime( mpi *X, +int mpi_is_prime( const mpi *X, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); diff --git a/library/bignum.c b/library/bignum.c index 2d04eb46e..8a751a353 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -2041,7 +2041,7 @@ cleanup: /* * Pseudo-primality test: small factors, then Miller-Rabin */ -int mpi_is_prime( mpi *X, +int mpi_is_prime( const mpi *X, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ) {