mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Fixed const correctness issues that have no impact on the ABI
(cherry picked from commit eae09db9e5
)
Conflicts:
library/gcm.c
This commit is contained in:
@ -254,8 +254,7 @@ void sha1_update( sha1_context *ctx, const unsigned char *input, size_t ilen )
|
||||
|
||||
if( left && ilen >= fill )
|
||||
{
|
||||
memcpy( (void *) (ctx->buffer + left),
|
||||
(void *) input, fill );
|
||||
memcpy( (void *) (ctx->buffer + left), input, fill );
|
||||
sha1_process( ctx, ctx->buffer );
|
||||
input += fill;
|
||||
ilen -= fill;
|
||||
@ -270,10 +269,7 @@ void sha1_update( sha1_context *ctx, const unsigned char *input, size_t ilen )
|
||||
}
|
||||
|
||||
if( ilen > 0 )
|
||||
{
|
||||
memcpy( (void *) (ctx->buffer + left),
|
||||
(void *) input, ilen );
|
||||
}
|
||||
memcpy( (void *) (ctx->buffer + left), input, ilen );
|
||||
}
|
||||
|
||||
static const unsigned char sha1_padding[64] =
|
||||
@ -303,7 +299,7 @@ void sha1_finish( sha1_context *ctx, unsigned char output[20] )
|
||||
last = ctx->total[0] & 0x3F;
|
||||
padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last );
|
||||
|
||||
sha1_update( ctx, (unsigned char *) sha1_padding, padn );
|
||||
sha1_update( ctx, sha1_padding, padn );
|
||||
sha1_update( ctx, msglen, 8 );
|
||||
|
||||
PUT_UINT32_BE( ctx->state[0], output, 0 );
|
||||
|
Reference in New Issue
Block a user