This commit is contained in:
Zhi Guan
2018-12-19 12:21:42 +08:00
parent 3e3cc9d4a7
commit 62d385ab71
7 changed files with 10 additions and 5423 deletions

View File

@@ -57,6 +57,13 @@
#define SM2_KMETH_FLAGS 0
int EC_KEY_is_sm2p256v1(const EC_KEY *ec_key)
{
const EC_GROUP *group = EC_KEY_get0_group(ec_key);
if (group)
return EC_GROUP_get_curve_name(group) == NID_sm2p256v1;
return 0;
}
static const EC_KEY_METHOD gmssl_ec_key_method = {
"SM2 method", /* name */