cvs commit: src/lib/libmp mpasbn.c

Stefan Farfeleder stefanf at FreeBSD.org
Sat Jul 29 06:14:33 UTC 2006


On Fri, Jul 28, 2006 at 11:00:16PM +0000, Simon L. Nielsen wrote:
> simon       2006-07-28 23:00:16 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     lib/libmp            mpasbn.c 
>   Log:
>   Do not put BN_CTX structures on the stack, but instead allocate them
>   runtime using BN_CTX_new().  This is done since in OpenSSL 0.9.7e we
>   can only allocate BN_CTX on the stack by including an internal OpenSSL
>   header file, and in OpenSSL 0.9.8 BN_CTX is entirely opaque, so having
>   it on the stack is not possible at all.
>   
>   This is done as preparation for OpenSSL 0.9.8b import.

It might be preferable to pass the allocated BN_CTXs to _mdiv(),
_mult() and _sdiv() because then msqrt() would have to call
BN_CTX_new() only once.

Stefan


More information about the cvs-src mailing list