1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Merge pull request #4720 from gilles-peskine-arm/gcm-finish-outlen

Add output_length parameter to mbedtls_gcm_finish
This commit is contained in:
Gilles Peskine
2021-06-24 20:02:40 +02:00
committed by GitHub
4 changed files with 31 additions and 9 deletions

View File

@ -339,6 +339,10 @@ int mbedtls_gcm_update( mbedtls_gcm_context *ctx,
* then mbedtls_gcm_finish() never produces any output,
* so \p output_size can be \c 0.
* - \p output_size never needs to be more than \c 15.
* \param output_length On success, \p *output_length contains the actual
* length of the output written in \p output.
* On failure, the content of \p *output_length is
* unspecified.
*
* \return \c 0 on success.
* \return #MBEDTLS_ERR_GCM_BAD_INPUT on failure:
@ -347,6 +351,7 @@ int mbedtls_gcm_update( mbedtls_gcm_context *ctx,
*/
int mbedtls_gcm_finish( mbedtls_gcm_context *ctx,
unsigned char *output, size_t output_size,
size_t *output_length,
unsigned char *tag, size_t tag_len );
/**