#include "server.h"
#include "database.h"
#include <security_cdsa_utilities/acl_any.h>
+#include <security_utilities/cfmunge.h>
+#include <security_utilities/logging.h>
//
{
mValidKey = true;
setup(newKey, moreAttributes);
- secdebug("SSkey", "%p (handle %#x) created from key alg=%u use=0x%x attr=0x%x db=%p",
+ secinfo("SSkey", "%p (handle %#x) created from key alg=%u use=0x%x attr=0x%x db=%p",
this, handle(), mKey.header().algorithm(), mKey.header().usage(), mAttributes, &db);
}
LocalKey::~LocalKey()
{
- secdebug("SSkey", "%p destroyed", this);
+ secinfo("SSkey", "%p destroyed", this);
}
acl().cssmSetInitial(*owner); // specified
else
acl().cssmSetInitial(new AnyAclSubject()); // defaulted
+
+ if (this->database().dbVersion() >= CommonBlob::version_partition) {
+ // put payload into an AclEntry tagged as CSSM_APPLE_ACL_TAG_PARTITION_ID...
+ // ... unless the client has the "converter" entitlement as attested by Apple
+ if (!(process().checkAppleSigned() && process().hasEntitlement(migrationEntitlement)))
+ this->acl().createClientPartitionID(this->process());
+ }
}