mirror of
https://github.com/openssl/openssl.git
synced 2024-12-03 05:41:46 +08:00
Make SM3 a mandatory hash function for SM2.
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/10942)
This commit is contained in:
parent
bbaddbc068
commit
ef077ba0d2
@ -507,9 +507,9 @@ static int ec_pkey_ctrl(EVP_PKEY *pkey, int op, long arg1, void *arg2)
|
||||
if (EVP_PKEY_id(pkey) == EVP_PKEY_SM2) {
|
||||
/* For SM2, the only valid digest-alg is SM3 */
|
||||
*(int *)arg2 = NID_sm3;
|
||||
} else {
|
||||
*(int *)arg2 = NID_sha256;
|
||||
return 2; /* Make it mandatory */
|
||||
}
|
||||
*(int *)arg2 = NID_sha256;
|
||||
return 1;
|
||||
|
||||
case ASN1_PKEY_CTRL_SET1_TLS_ENCPT:
|
||||
|
Loading…
Reference in New Issue
Block a user