]> 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:29:01 +0000 (15:29 +0200)
commit9b62226ba31413aca3a8ea3b701ab825d81f4a52
treead6d95350fa1f56bc61aa5541e25bf954afb9f1d
parenta3323ff873d0f9d5a3d31aa3cf34275f79e65203
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/28641)

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