From 49ce6f09736909308fe171e63267dd41aa0a312d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 31 Mar 2015 13:05:39 +0200 Subject: [PATCH] Fix constness of asn1_write_mpi() --- include/mbedtls/asn1write.h | 2 +- library/asn1write.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mbedtls/asn1write.h b/include/mbedtls/asn1write.h index 154a6ba20..dc30206ba 100644 --- a/include/mbedtls/asn1write.h +++ b/include/mbedtls/asn1write.h @@ -83,7 +83,7 @@ int asn1_write_raw_buffer( unsigned char **p, unsigned char *start, * * \return the length written or a negative error code */ -int asn1_write_mpi( unsigned char **p, unsigned char *start, mpi *X ); +int asn1_write_mpi( unsigned char **p, unsigned char *start, const mpi *X ); #endif /* POLARSSL_BIGNUM_C */ /** diff --git a/library/asn1write.c b/library/asn1write.c index 78038675d..a5a35f60a 100644 --- a/library/asn1write.c +++ b/library/asn1write.c @@ -99,7 +99,7 @@ int asn1_write_raw_buffer( unsigned char **p, unsigned char *start, } #if defined(POLARSSL_BIGNUM_C) -int asn1_write_mpi( unsigned char **p, unsigned char *start, mpi *X ) +int asn1_write_mpi( unsigned char **p, unsigned char *start, const mpi *X ) { int ret; size_t len = 0;