On Sat, 18 Dec 2010 18:02:21 -0200
Klaus Heinrich Kiwi <[email protected]> wrote:

>    For most C_Digest* functions (exception is C_DigestKey), the spec
>    specified the scenarios in which a digest operation should
>    terminate (either due to error or normal finalization).
> 
>    This patch brings the digest_mgr_cleanup() function to be called
>    from *inside* the digest_mgr_* functions, so we can better manage
>    resources from a single place.
> 
>    This patch is for the `common` part, and also fix at least one
>    memory leak in the software-fallback SHA1 code (where
>    ckm_sha1_init could continuously allocate contexts without
>    being properly cleaned-up)
> 
> Signed-off-by: Klaus Heinrich Kiwi <[email protected]>
> ---
>  usr/lib/pkcs11/common/dig_mgr.c   |  139 ++++++++++++++++-------
>  usr/lib/pkcs11/common/mech_md2.c  |    2 -
>  usr/lib/pkcs11/common/mech_md5.c  |   13 --
>  usr/lib/pkcs11/common/mech_rsa.c  |   40 ++-----
>  usr/lib/pkcs11/common/mech_sha.c  |   56 +---------
>  usr/lib/pkcs11/common/mech_ssl3.c |  229 
> +++++++++++++++++--------------------
>  usr/lib/pkcs11/common/new_host.c  |   12 --
>  7 files changed, 219 insertions(+), 272 deletions(-)
set applied (3 of 3)

-- 
Klaus Heinrich Kiwi | [email protected] | http://blog.klauskiwi.com
Open Source Security blog :     http://www.ratliff.net/blog
IBM Linux Technology Center :   http://www.ibm.com/linux/ltc

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to