提交 675fa854 编写于 作者: N neighbads 提交者: Richard Levitte

Update sm2_crypt.c

asn1_encode : x, y  =>    0 | x,0 | y
(because of DER encoding rules when x and y have high bit set)

CLA: Trivial
Reviewed-by: NPaul Dale <paul.dale@oracle.com>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6694)
上级 85aebfcc
......@@ -95,7 +95,7 @@ int sm2_ciphertext_size(const EC_KEY *key, const EVP_MD *digest, size_t msg_len,
if (field_size == 0 || md_size < 0)
return 0;
*ct_size = 10 + 2 * field_size + (size_t)md_size + msg_len;
*ct_size = 12 + 2 * field_size + (size_t)md_size + msg_len;
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册