]> git.ipfire.org Git - thirdparty/openssl.git/commit
Add Missing Error Messages for AES-OCB Tag Length Validation
authorerbsland-dev <github@erbsland.dev>
Tue, 10 Sep 2024 19:24:59 +0000 (21:24 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 13 Sep 2024 08:13:04 +0000 (10:13 +0200)
commitceee552964e4e1771cdff2ecaf94e011f6dff73b
tree90b019b20e55cc85115ab4304e848032bdb7bccf
parent642567ad8ae73de373fc4640f6c1f20fd2f89337
Add Missing Error Messages for AES-OCB Tag Length Validation

Related to #8331
Addressing found issues by adding specific error messages to improve
feedback when tag length checks fail for the `EVP_CTRL_AEAD_SET_TAG`
parameter in the AES-OCB algorithm.

- Added PROV_R_INVALID_TAG_LENGTH error to indicate when the current tag
  length exceeds the maximum tag length of the algorithm.
- Added `PROV_R_INVALID_TAG_LENGTH` error to indicate when the current tag
  length in the context does not match a custom tag length provided as
  a parameter.
- Added `ERR_R_PASSED_INVALID_ARGUMENT` error to handle cases where an
  invalid pointer is passed in encryption mode.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25425)

(cherry picked from commit 645edf50f0274448174d9739543bf01b1708b2f5)
providers/implementations/ciphers/cipher_aes_ocb.c