--- Shared/libCdsaCrypt/libCdsaCrypt.cpp.orig 2006-11-12 12:07:56.000000000 -0600
+++ Shared/libCdsaCrypt/libCdsaCrypt.cpp 2010-10-04 22:30:27.000000000 -0500
* Standard app-level memory functions required by CDSA.
-void * appMalloc (uint32 size, void *allocRef) {
+void * appMalloc (CSSM_SIZE size, void *allocRef) {
void appFree (void *mem_ptr, void *allocRef) {
-void * appRealloc (void *ptr, uint32 size, void *allocRef) {
+void * appRealloc (void *ptr, CSSM_SIZE size, void *allocRef) {
return( realloc( ptr, size ) );
-void * appCalloc (uint32 num, uint32 size, void *allocRef) {
+void * appCalloc (uint32 num, CSSM_SIZE size, void *allocRef) {
return( calloc( num, size ) );
static CSSM_API_MEMORY_FUNCS memFuncs = {
CSSM_DATA remData = {0, NULL};
+ CSSM_SIZE bytesEncrypted;
crtn = genCryptHandle(cspHandle, key, &ivCommon, &ccHandle);
CSSM_DATA remData = {0, NULL};
+ CSSM_SIZE bytesDecrypted;
crtn = genCryptHandle(cspHandle, key, &ivCommon, &ccHandle);
/* 1. any more data to encrypt? */
if(plainText && plainText->Length) {
+ CSSM_SIZE bytesEncrypted;
crtn = CSSM_EncryptDataUpdate(ccHandle,
/* 1. any more data to decrypt? */
if(cipherText && cipherText->Length) {
+ CSSM_SIZE bytesDecrypted;
crtn = CSSM_DecryptDataUpdate(ccHandle,