]> 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:28:41 +0000 (15:28 +0200)
commit0c2d67f417a2c2e0a63272e8d7753489b4958c0b
treed31f1f552d4680986d27fbdca936dc2ec098155c
parente06e82a70a0032077cd0ef8531eaf4f0b52b482c
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)
crypto/evp/p_lib.c
test/fake_rsaprov.c
test/fake_rsaprov.h
test/provider_pkey_test.c