mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-17 10:23:47 +08:00
Bug fix
This commit is contained in:
@@ -3339,13 +3339,3 @@ int EC_curve_nist2nid(const char *name)
|
||||
}
|
||||
return NID_undef;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_SM2
|
||||
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;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -654,7 +654,3 @@ int X25519(uint8_t out_shared_key[32], const uint8_t private_key[32],
|
||||
const uint8_t peer_public_value[32]);
|
||||
void X25519_public_from_private(uint8_t out_public_value[32],
|
||||
const uint8_t private_key[32]);
|
||||
|
||||
#ifndef OPENSSL_NO_SM2
|
||||
int EC_KEY_is_sm2p256v1(const EC_KEY *ec_key);
|
||||
#endif
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user