Skip to content

Commit

Permalink
fixup! evp/signature.c: add NID output to EVP_R_OPERATION_NOT_SUPPORT…
Browse files Browse the repository at this point in the history
…ED_FOR_THIS_KEYTYPE
  • Loading branch information
DDvO committed Oct 17, 2023
1 parent 1f4caba commit 9b49ba6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crypto/evp/signature.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,18 +407,17 @@ static int evp_pkey_signature_init(EVP_PKEY_CTX *ctx, int operation,
evp_pkey_ctx_free_old_ops(ctx);
ctx->operation = operation;

ERR_set_mark();

if (evp_pkey_ctx_is_legacy(ctx))
goto legacy;

if (ctx->pkey == NULL) {
ERR_clear_last_mark();
ERR_raise(ERR_LIB_EVP, EVP_R_NO_KEY_SET);
goto err;
}
keynid = ctx->pkey->type;

ERR_set_mark();
if (evp_pkey_ctx_is_legacy(ctx))
goto legacy;

/*
* Try to derive the supported signature from |ctx->keymgmt|.
*/
Expand Down

0 comments on commit 9b49ba6

Please sign in to comment.