Fix the default digest algorthm of SM2
authorPaul Yang <yang.yang@baishancloud.com>
Mon, 25 Feb 2019 09:34:03 +0000 (17:34 +0800)
committerPaul Yang <yang.yang@baishancloud.com>
Wed, 27 Feb 2019 02:05:17 +0000 (10:05 +0800)
commite766f4a0531bffdab8ad2038279b755928d7a40a
treeb4496b988a15d355f71aa4e0cb280a9b575efce5
parenta7cef52f9b961dcb1e5d0c3b75185a12a88ad2db
Fix the default digest algorthm of SM2

Currently SM2 shares the ameth with EC, so the current default digest
algorithm returned is SHA256. This fixes the default digest algorithm of
SM2 to SM3, which is the only valid digest algorithm for SM2 signature.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8186)
crypto/ec/ec_ameth.c