Fix sm2utl bugs

This commit is contained in:
Zhi Guan
2019-02-02 20:44:51 +08:00
parent 22027d6656
commit d114bed3f8
6 changed files with 5469 additions and 5435 deletions

View File

@@ -250,6 +250,8 @@ int ec_key_simple_generate_key(EC_KEY *eckey)
int ec_key_simple_generate_public_key(EC_KEY *eckey)
{
if (eckey->pub_key == NULL)
eckey->pub_key = EC_POINT_new(eckey->group);
return EC_POINT_mul(eckey->group, eckey->pub_key, eckey->priv_key, NULL,
NULL, NULL);
}