]> 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:12 +0000 (15:27 +0200)
commit051108ee53d5b0ff5a125d32acfbc7e20899b022
tree3551004c32b83f9e47d223ea6b7e87eff6492aff
parent556ba81601a37530c3620016bdeaf13094b4fb91
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)
crypto/evp/p_lib.c
test/fake_rsaprov.c
test/fake_rsaprov.h
test/provider_pkey_test.c