RE: Declare BN_CTX on stack (not BN_CTX*)

2014-01-17 Thread Carl Young
[Sorry for top-post - Outlook Web Client] I would say that BN_CTX_init() is deprecated and you should be using BN_CTX * ctx = BN_CTX_new(); Indeed, https://www.openssl.org/docs/crypto/BN_CTX_new.html says BN_CTX_init() (deprecated) initializes an existing uninitialized BN_CTX. This should not

Re: Declare BN_CTX on stack (not BN_CTX*)

2014-01-17 Thread Jeffrey Walton
On Fri, Jan 17, 2014 at 4:38 AM, Carl Young carlyo...@keycomm.co.uk wrote: ... I would say that BN_CTX_init() is deprecated and you should be using BN_CTX * ctx = BN_CTX_new(); Yeah, it works with BN_CTX *. I was hoping to keep out of the memory manager since it seems like a waste when it can

Re: Declare BN_CTX on stack (not BN_CTX*)

2014-01-17 Thread Viktor Dukhovni
On Fri, Jan 17, 2014 at 09:57:00AM -0500, Jeffrey Walton wrote: BN_CTX_init() (deprecated) initializes an existing uninitialized BN_CTX. This should not be used for new programs. Use BN_CTX_new() instead. Odd its still being used in the source code. Not that odd. Libraries are free to

Re: Declare BN_CTX on stack (not BN_CTX*)

2014-01-17 Thread Jeffrey Walton
On Fri, Jan 17, 2014 at 11:16 AM, Viktor Dukhovni openssl-us...@dukhovni.org wrote: On Fri, Jan 17, 2014 at 09:57:00AM -0500, Jeffrey Walton wrote: BN_CTX_init() (deprecated) initializes an existing uninitialized BN_CTX. This should not be used for new programs. Use BN_CTX_new() instead.