t will just return the required buffer length.</p>

<p>The function EC_KEY_priv2buf() allocates a buffer of suitable length and writes an EC_KEY to it in octet format. The allocated buffer is written to <i>*pbuf</i> and its length is returned. The caller must free up the allocated buffer with a call to OPENSSL_free(). Since the allocated buffer value is written to <i>*pbuf</i> the <i>pbuf</i> parameter <b>MUST NOT</b> be <b>NULL</b>.</p>

<p>EC_KEY_priv2buf() converts an EC_KEY private key into an allocated