From 76123661a1db136b9ef368dc296a628818e7a4cc Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sun, 12 Jan 2020 01:05:01 +0100 Subject: Change returned -2 to 0 in EVP_Digest{Sign,Verify}Init() The returned -2 was to mark when these operations are unsupported. However, that breaks away from the previous API and expectations, and there's not enough justification for that not being zero. Reviewed-by: Nicola Tuveri Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/10815) --- crypto/evp/m_sigver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/evp/m_sigver.c') diff --git a/crypto/evp/m_sigver.c b/crypto/evp/m_sigver.c index faee507342..dbfa01b3ed 100644 --- a/crypto/evp/m_sigver.c +++ b/crypto/evp/m_sigver.c @@ -167,7 +167,7 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, legacy: if (ctx->pctx->pmeth == NULL) { EVPerr(0, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE); - return -2; + return 0; } if (!(ctx->pctx->pmeth->flags & EVP_PKEY_FLAG_SIGCTX_CUSTOM)) { -- cgit v1.2.1