]> git.ipfire.org Git - thirdparty/openssl.git/commit
rsa: Accept NULL OAEP label for backward compatibility
authorDaiki Ueno <dueno@redhat.com>
Mon, 16 Oct 2023 05:42:12 +0000 (14:42 +0900)
committerTomas Mraz <tomas@openssl.org>
Wed, 18 Oct 2023 14:26:17 +0000 (16:26 +0200)
commit86f3fae5f8fb4d9cb96ea9b34250cd3abc3038ef
tree1ecf1aef3617479c4e34eff967546e7c33901efb
parenta9c69e0e70d7fcf1bd7b55754894d5ebf7ae5aad
rsa: Accept NULL OAEP label for backward compatibility

According to the manual page, EVP_PKEY_CTX_set0_rsa_oaep_label()
should accept NULL as the label argument, though the function
currently rejects it while setting the corresponding octet string
parameter with OSSL_PARAM_construct_octet_string, which expects
non-NULL input.  This adds a workaround to the caller for backward
compatibility.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22397)

(cherry picked from commit 21b98da9d80c561b6273b0c51c259196d6740e70)
crypto/rsa/rsa_lib.c
test/evp_extra_test.c