Richard Levitte - VMS Whacker wrote:
>
> From: Ben Laurie <[EMAIL PROTECTED]>
>
> ben> > I'm starting to think that we should have BN_mul() and BN_sqr() break
> ben> > constness when they need to do a bn_wexpand(). After all, there are
> ben> > flags telling us if the BIGNUM is static or not, and if it isn't, it's
> ben> > been allocated on the heap.
> ben>
> ben> Doesn't this mean you'll have to undo loads of constification? I do hope
> ben> you don't mean that you'll cast away the const?
>
> It does mean exactly that. If we want to constify the API, what
> choice do we have? Also, note that in the problematic sections,
> there's a check to see that the BIGNUM data isn't flagged as static.
It is absolutely unacceptable to take a const argument and then modify
it! I can see no reason why you'd want to, either.
> This *is* a conflict between the wish to constify and efficiency. If
> you have some elegant solution, please tell us.
If efficiency prevents you from constifying, then that's just the way it
is. We need efficiency more than we need memory to not be written.
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]