#include <utilities/der_plist.h>
#include <security_utilities/CSPDLTransaction.h>
-#include <SecBasePriv.h>
-
-#define SENDACCESSNOTIFICATIONS 1
+#include <Security/SecBasePriv.h>
//%%% schema indexes should be defined in Schema.h
#define _kSecAppleSharePasswordItemClass 'ashp'
{
getLocalContent(attrList, length, outData);
}
-
- // Inform anyone interested that we are doing this
-#if SENDACCESSNOTIFICATIONS
- if (outData)
- {
- secinfo("kcnotify", "ItemImpl::getContent(%p, %p, %p, %p) retrieved content",
- itemClass, attrList, length, outData);
-
- KCEventNotifier::PostKeychainEvent(kSecDataAccessEvent, mKeychain, this);
- }
-#endif
}
void
ItemImpl::freeContent(SecKeychainAttributeList *attrList, void *data)
{
- Allocator &allocator = Allocator::standard(); // @@@ This might not match the one used originally
+ Allocator &allocator = Allocator::standard(Allocator::sensitive); // @@@ This might not match the one used originally
if (data)
allocator.free(data);
theList->count = 0;
theList->attr = NULL;
} else {
- SecKeychainAttribute *attr=reinterpret_cast<SecKeychainAttribute *>(malloc(sizeof(SecKeychainAttribute)*attrCount));
+ SecKeychainAttribute *attr=reinterpret_cast<SecKeychainAttribute *>(calloc(attrCount, sizeof(SecKeychainAttribute)));
theList->count=attrCount;
theList->attr=attr;
if (length) *length=(UInt32)itemData.length();
itemData.Length=0;
-
-#if SENDACCESSNOTIFICATIONS
- secinfo("kcnotify", "ItemImpl::getAttributesAndData(%p, %p, %p, %p, %p) retrieved data",
- info, itemClass, attrList, length, outData);
-
- KCEventNotifier::PostKeychainEvent(kSecDataAccessEvent, mKeychain, this);
-#endif
}
}
void
ItemImpl::freeAttributesAndData(SecKeychainAttributeList *attrList, void *data)
{
- Allocator &allocator = Allocator::standard(); // @@@ This might not match the one used originally
+ Allocator &allocator = Allocator::standard(Allocator::sensitive); // @@@ This might not match the one used originally
if (data)
allocator.free(data);
}
getContent(NULL, &outData);
-
-#if SENDACCESSNOTIFICATIONS
- secinfo("kcnotify", "ItemImpl::getData retrieved data");
-
- //%%%<might> be done elsewhere, but here is good for now
- KCEventNotifier::PostKeychainEvent(kSecDataAccessEvent, mKeychain, this);
-#endif
}
SSGroup