]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
sm2: fix error raise to not fail make update
authorPauli <pauli@openssl.org>
Wed, 25 Aug 2021 00:12:17 +0000 (10:12 +1000)
committerPauli <pauli@openssl.org>
Wed, 25 Aug 2021 00:12:17 +0000 (10:12 +1000)
Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16411)

crypto/sm2/sm2_crypt.c

index e26b48390a95644f588cc82ada0b4f31feba370a..5318c6199f68018f64772356e19ff9d29d107252 100644 (file)
@@ -313,7 +313,7 @@ int ossl_sm2_decrypt(const EC_KEY *key,
     C3 = sm2_ctext->C3->data;
     msg_len = sm2_ctext->C2->length;
     if (*ptext_len < (size_t)msg_len) {
-        SM2err(SM2_F_SM2_DECRYPT, SM2_R_BUFFER_TOO_SMALL);
+        ERR_raise(ERR_LIB_SM2, SM2_R_BUFFER_TOO_SMALL);
         goto done;
     }