]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix EVP_PKEY_can_sign() handling of NULL from query_operation_name()
authorDaniel Kubec <kubec@openssl.org>
Fri, 19 Sep 2025 13:48:41 +0000 (15:48 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 25 Sep 2025 13:27:47 +0000 (15:27 +0200)
commit832c39e915d24f13ea2683479a1c7bc07254aa66
tree43a8c9b9d2bee59896add2828ab049d73e56571b
parentb75e7270bb8357ee95fbd5d0af4e521e37e3d095
Fix EVP_PKEY_can_sign() handling of NULL from query_operation_name()

EVP_PKEY_can_sign() assumed query_operation_name(OSSL_OP_SIGNATURE)
always returns a non-NULL string. According to the documentation,
query_operation_name() may return NULL, in which case
EVP_KEYMGMT_get0_name() should be used as a fallback.

Fixes #27790

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28620)

(cherry picked from commit 051108ee53d5b0ff5a125d32acfbc7e20899b022)
crypto/evp/p_lib.c
test/fake_rsaprov.c
test/fake_rsaprov.h
test/provider_pkey_test.c