mirror of
https://github.com/torvalds/linux.git
synced 2026-11-09 05:34:02 +01:00
lib/crypto: mldsa: Add __must_check to mldsa_verify()
Signature verification status always must be checked. Add __must_check,
for consistency with e.g. the AES-GCM and ChaCha20Poly1305 functions.
No effect on current callers, who always check the return value.
Fixes: 64edccea59 ("lib/crypto: Add ML-DSA verification support")
Cc: stable@vger.kernel.org
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://patch.msgid.link/20261029054534.68481-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
This commit is contained in:
parent
efb621a57d
commit
01ad209f12
|
|
@ -52,8 +52,9 @@ enum mldsa_alg {
|
|||
* * -EKEYREJECTED if the signature is invalid but otherwise well-formed
|
||||
* * -ENOMEM if out of memory so the validity of the signature is unknown
|
||||
*/
|
||||
int mldsa_verify(enum mldsa_alg alg, const u8 *sig, size_t sig_len,
|
||||
const u8 *msg, size_t msg_len, const u8 *pk, size_t pk_len);
|
||||
int __must_check mldsa_verify(enum mldsa_alg alg, const u8 *sig, size_t sig_len,
|
||||
const u8 *msg, size_t msg_len, const u8 *pk,
|
||||
size_t pk_len);
|
||||
|
||||
#if IS_ENABLED(CONFIG_CRYPTO_LIB_MLDSA_KUNIT_TEST)
|
||||
/* Internal function, exposed only for unit testing */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user