Correct ECDSA example.
This commit is contained in:
parent
d5605699a1
commit
36019f70e8
@ -95,7 +95,7 @@ is ignored.
|
|||||||
|
|
||||||
ECDSA_verify() verifies that the signature in B<sig> of size
|
ECDSA_verify() verifies that the signature in B<sig> of size
|
||||||
B<siglen> is a valid ECDSA signature of the hash value
|
B<siglen> is a valid ECDSA signature of the hash value
|
||||||
value B<dgst> of size B<dgstlen> using the public key B<eckey>.
|
B<dgst> of size B<dgstlen> using the public key B<eckey>.
|
||||||
The parameter B<type> is ignored.
|
The parameter B<type> is ignored.
|
||||||
|
|
||||||
ECDSA_do_sign() is wrapper function for ECDSA_do_sign_ex with B<kinv>
|
ECDSA_do_sign() is wrapper function for ECDSA_do_sign_ex with B<kinv>
|
||||||
@ -131,16 +131,12 @@ specific)
|
|||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
ECDSA_SIG *sig;
|
ECDSA_SIG *sig;
|
||||||
EC_KEY *eckey = EC_KEY_new();
|
EC_KEY *eckey;
|
||||||
|
eckey = EC_KEY_new_by_curve_name(NID_secp192k1);
|
||||||
if (eckey == NULL)
|
if (eckey == NULL)
|
||||||
{
|
{
|
||||||
/* error */
|
/* error */
|
||||||
}
|
}
|
||||||
key->group = EC_GROUP_new_by_nid(NID_secp192k1);
|
|
||||||
if (key->group == NULL)
|
|
||||||
{
|
|
||||||
/* error */
|
|
||||||
}
|
|
||||||
if (!EC_KEY_generate_key(eckey))
|
if (!EC_KEY_generate_key(eckey))
|
||||||
{
|
{
|
||||||
/* error */
|
/* error */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user