From: Todd Short Date: Fri, 18 May 2018 18:54:01 +0000 (-0400) Subject: Fix no-sm2 with clang X-Git-Tag: OpenSSL_1_1_1-pre8~120 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=47eaa32d2671c1b608200afb97cc2f0040053686;p=oweals%2Fopenssl.git Fix no-sm2 with clang Return immediately upon discovery of bad message digest. Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6298) --- diff --git a/crypto/ec/ec_pmeth.c b/crypto/ec/ec_pmeth.c index 5be292379a..2fde4f7a5b 100644 --- a/crypto/ec/ec_pmeth.c +++ b/crypto/ec/ec_pmeth.c @@ -124,7 +124,7 @@ static int pkey_ec_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, if (ec_nid == NID_sm2) { #if defined(OPENSSL_NO_SM2) - ret = -1; + return -1; #else ret = SM2_sign(type, tbs, tbslen, sig, &sltmp, ec); #endif