Commit 47eaa32d authored by Todd Short's avatar Todd Short Committed by Matt Caswell
Browse files

Fix no-sm2 with clang



Return immediately upon discovery of bad message digest.

Reviewed-by: default avatarAndy Polyakov <appro@openssl.org>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6298)
parent adf65243
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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