S">EXAMPLES</h1>

<p>Creating an ECDSA signature of a given SHA-256 hash value using the named curve prime256v1 (aka P-256). This example uses deprecated functionality. See <a href="#DESCRIPTION">&quot;DESCRIPTION&quot;</a>.</p>

<p>First step: create an EC_KEY object (note: this part is <b>not</b> ECDSA specific)</p>

<pre><code>int ret;
ECDSA_SIG *sig;
EC_KEY *eckey;

eckey = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
if (eckey == NULL)
    /* error */
if (EC_KEY_generate_key(eckey) == 0)
    /* erro