shpedoikal/opencryptoki — pull request #3 by shpedoikal (2011-10-17 15:58:49+00:00)
Title: Update to the internal crypto code

This update changes the callers of opencryptoki's internal md5/sha1 routines to use the linux kernel's user-space crypto API. To test, this requires a recent kernel -- this is tested against 3.1.0-rc9+. Given that this is a linux-specific feature, we'll likely want to push this into the next major release instead of a point release.

There are two paths to opencryptoki's internal md5/sha1 routines, one is through compute_sha/compute_md5 in usr/lib/pkcs11/common/utility.c, which is called by opencryptoki internally to do things like integrity checks on the token data objects. The other is through mech_md5.c and mech_sha1.c in usr/lib/pkcs11/common, which provides the interfaces called by the application.

This patch only replaces the calls made from utility.c for the internal crypto routines. Follow on patches will need to replace the application facing interfaces so that the internal routines can be completely removed. At that point opencryptoki can be completely independent of any user-space crypto library.

Please review.

Thanks,
Kent