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

Viktor Dukhovni openssl-users at dukhovni.org
Fri Feb 26 17:04:43 UTC 2016


On Fri, Feb 26, 2016 at 04:50:27PM +0000, Stephen Henson via RT wrote:

> > 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.

I'd like to propose a policy of no bug fixes to undocumented public
interfaces.  If the interface is useful enough to fix, it has to be
documented.  Anyone care to produce manpages for EC_KEY_priv2buf or
EC_KEY_priv2oct?

-- 
	Viktor.


More information about the openssl-dev mailing list