Re: Patch: save/load state of SHA1
Richard Salz wrote:
[color=blue]
>Being able to load/save the digest state is a good idea. Management of
>the buffer should be left to the caller, however. Much simpler and
>cleaner that way. For example, work like the DER/i2d routines: if given a
>NULL pointer, return how much space is needed. Or provide something like
>the RSA_size function which tells you how much space is needed to store
>the state.
>
>[/color]
That approach is fine too, and more traditional.
The current patch allows slightly easier code in all applications using
it (it saves them a 'get size' call, a malloc and a check if the malloc
succeeded).
I'll post an updated version of the patch later.
Nanno
______________________________________________________________________
OpenSSL Project [url]http://www.openssl.org[/url]
Development Mailing List [email]openssl-dev@openssl.org[/email]
Automated List Manager [email]majordomo@openssl.org[/email]