]> git.saurik.com Git - apple/security.git/blobdiff - securityd/src/localdatabase.cpp
Security-58286.200.222.tar.gz
[apple/security.git] / securityd / src / localdatabase.cpp
index 418cc31166796e84117a7486e7c83388fc1a0d6c..2217294c2000d34082aaed77854f2080e7f083cb 100644 (file)
@@ -30,7 +30,6 @@
 #include "localkey.h"
 #include "server.h"
 #include "session.h"
-#include <security_agent_client/agentclient.h>
 #include <security_cdsa_utilities/acl_any.h>   // for default owner ACLs
 #include <security_cdsa_client/wrapkey.h>
 #include <security_cdsa_client/genkey.h>
@@ -201,7 +200,7 @@ void LocalDatabase::wrapKey(const Context &context, const AccessCredentials *cre
 {
     keyToBeWrapped.validate(context.algorithm() == CSSM_ALGID_NONE ?
             CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR : CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED,
-        cred);
+                            cred, &keyToBeWrapped.database());
     if (wrappingKey) {
         context.replace(CSSM_ATTRIBUTE_KEY, myKey(*wrappingKey).cssmKey());
                wrappingKey->validate(CSSM_ACL_AUTHORIZATION_ENCRYPT, context);