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:09:54 +0000 (10:09 +0800)
commit9c6d536f532a737216f2ae0e7d168c99ed989a0d
treefe8779c0d7b4c6c33c53124fb56cf4b559fa428f
parente8dc6580368fdc26384fc69d58e038a3e1c6e368
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)

(cherry picked from commit e766f4a0531bffdab8ad2038279b755928d7a40a)
crypto/ec/ec_ameth.c