From d61cc3b24677acd182e4b87bc7e7f40a23480b64 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Fri, 11 Oct 2013 09:38:49 +0200 Subject: [PATCH] Possible naming collision in dhm_context --- ChangeLog | 1 + include/polarssl/dhm.h | 2 +- library/dhm.c | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b32ef3fc..3a3237c4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ Bugfix * Compile errors with POLARSSL_RSA_NO_CRT * Header files with 'polarssl/' * Const correctness + * Possible naming collision in dhm_context = PolarSSL-1.3.0 released on 2013-10-01 Features diff --git a/include/polarssl/dhm.h b/include/polarssl/dhm.h index 75dff193b..4665ff9f9 100644 --- a/include/polarssl/dhm.h +++ b/include/polarssl/dhm.h @@ -152,7 +152,7 @@ typedef struct mpi RP; /*!< cached R^2 mod P */ mpi Vi; /*!< blinding value */ mpi Vf; /*!< un-blinding value */ - mpi _X; /*!< previous X */ + mpi pX; /*!< previous X */ } dhm_context; diff --git a/library/dhm.c b/library/dhm.c index dc815d9cb..e8aa8191c 100644 --- a/library/dhm.c +++ b/library/dhm.c @@ -276,9 +276,9 @@ static int dhm_update_blinding( dhm_context *ctx, * Don't use any blinding the first time a particular X is used, * but remember it to use blinding next time. */ - if( mpi_cmp_mpi( &ctx->X, &ctx->_X ) != 0 ) + if( mpi_cmp_mpi( &ctx->X, &ctx->pX ) != 0 ) { - MPI_CHK( mpi_copy( &ctx->_X, &ctx->X ) ); + MPI_CHK( mpi_copy( &ctx->pX, &ctx->X ) ); MPI_CHK( mpi_lset( &ctx->Vi, 1 ) ); MPI_CHK( mpi_lset( &ctx->Vf, 1 ) ); @@ -384,7 +384,7 @@ cleanup: */ void dhm_free( dhm_context *ctx ) { - mpi_free( &ctx->_X); mpi_free( &ctx->Vf ); mpi_free( &ctx->Vi ); + mpi_free( &ctx->pX); mpi_free( &ctx->Vf ); mpi_free( &ctx->Vi ); mpi_free( &ctx->RP ); mpi_free( &ctx->K ); mpi_free( &ctx->GY ); mpi_free( &ctx->GX ); mpi_free( &ctx->X ); mpi_free( &ctx->G ); mpi_free( &ctx->P );