Fix no-sm2 with clang
authorTodd Short <tshort@akamai.com>
Fri, 18 May 2018 18:54:01 +0000 (14:54 -0400)
committerMatt Caswell <matt@openssl.org>
Tue, 29 May 2018 16:03:14 +0000 (17:03 +0100)
Return immediately upon discovery of bad message digest.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6298)

crypto/ec/ec_pmeth.c

index 5be2923..2fde4f7 100644 (file)
@@ -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