mirror of
https://github.com/openssl/openssl.git
synced 2025-01-30 14:01:55 +08:00
Properly handle a partial block in OCB mode
If we have previously been passed a partial block in an "Update" call then make sure we properly increment the output buffer when we use it. Fixes #2273 Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2275)
This commit is contained in:
parent
0ba5a9eaa0
commit
7c12c7b61c
@ -2587,6 +2587,8 @@ static int aes_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
|||||||
}
|
}
|
||||||
written_len = AES_BLOCK_SIZE;
|
written_len = AES_BLOCK_SIZE;
|
||||||
*buf_len = 0;
|
*buf_len = 0;
|
||||||
|
if (out != NULL)
|
||||||
|
out += AES_BLOCK_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do we have a partial block to handle at the end? */
|
/* Do we have a partial block to handle at the end? */
|
||||||
|
Loading…
Reference in New Issue
Block a user