]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
m_sigver.c do_sigver_init(): add details to EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KE...
authorDr. David von Oheimb <dev@ddvo.net>
Mon, 2 Jun 2025 19:01:50 +0000 (21:01 +0200)
committerPauli <ppzgs1@gmail.com>
Wed, 10 Sep 2025 21:36:30 +0000 (07:36 +1000)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28473)

crypto/evp/m_sigver.c

index 976401041a100abc5eb236fd84baf7ba18f35488..740b9d7387ca8330929c3dd6fc564f70f9c8734d 100644 (file)
@@ -302,7 +302,9 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
         type = evp_get_digestbyname_ex(locpctx->libctx, mdname);
 
     if (ctx->pctx->pmeth == NULL) {
-        ERR_raise(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE);
+        ERR_raise_data(ERR_LIB_EVP, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE,
+                       ver ? "%s digest_verify_init" : "%s digest_sign_init",
+                       EVP_PKEY_get0_type_name(locpctx->pkey));
         return 0;
     }