mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-31 01:20:35 +00:00
Fixed multiple use of GCM-context bug due to split-up of GCM functions
This commit is contained in:
parent
d6f41c5bcd
commit
52cf16caeb
@ -181,7 +181,12 @@ int gcm_starts( gcm_context *ctx,
|
|||||||
const unsigned char *p;
|
const unsigned char *p;
|
||||||
size_t use_len;
|
size_t use_len;
|
||||||
|
|
||||||
|
memset( ctx->y, 0x00, sizeof(ctx->y) );
|
||||||
|
memset( ctx->buf, 0x00, sizeof(ctx->buf) );
|
||||||
|
|
||||||
ctx->mode = mode;
|
ctx->mode = mode;
|
||||||
|
ctx->len = 0;
|
||||||
|
ctx->add_len = 0;
|
||||||
|
|
||||||
if( iv_len == 12 )
|
if( iv_len == 12 )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user