Skip to content

Commit

Permalink
Fixed error when decrypting only signature.
Browse files Browse the repository at this point in the history
Signed-off-by: Ricardo González Moreno <correoricky@gmail.com>
  • Loading branch information
richiware committed Apr 17, 2020
1 parent bbd6c54 commit 0e1d95a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,7 @@ bool AESGCMGMAC_Transform::deserialize_SecureDataBody(

EVP_CIPHER_CTX_ctrl(d_ctx, EVP_CTRL_GCM_SET_TAG, AES_BLOCK_SIZE, tag.common_mac.data());

if (!EVP_DecryptFinal(d_ctx, &output_buffer[actual_size], &final_size))
if (!EVP_DecryptFinal(d_ctx, output_buffer ? &output_buffer[actual_size] : NULL, &final_size))
{
logWarning(SECURITY_CRYPTO, "Unable to decode the payload. EVP_DecryptFinal function returns an error");
EVP_CIPHER_CTX_free(d_ctx);
Expand Down

0 comments on commit 0e1d95a

Please sign in to comment.