[openssl-dev] [openssl.org #4343] master: EC_KEY_priv2buf (): check parameter sanity

Stephen Henson via RT rt at openssl.org
Fri Feb 26 16:50:27 UTC 2016


On Wed Feb 24 12:07:05 2016, mohan at computer.org wrote:
> Hi,
>
> I have PR https://github.com/openssl/openssl/pull/739 with the below
> changes, please have a look.
>
> - In EC_KEY_priv2buf(), check for pbuf sanity.
> - If invoked with NULL, gracefully returns the key length.
>

If you're doing this you're probably using the wrong API. EC_KEY_priv2buf()
allocates a buffer and returns its length. If you just want the length and/or
want to allocate a buffer yourself you should be using EV_KEY_priv2oct()
instead.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org

-- 
Ticket here: http://rt.openssl.org/Ticket/Display.html?id=4343
Please log in as guest with password guest if prompted



More information about the openssl-dev mailing list