2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
20 // keychainacl - Keychain-related ACL and credential forms
25 #include <Security/cssm.h>
26 #include <Security/cssmaclpod.h>
27 #include <Security/cssmcred.h>
28 #include <Security/cssmalloc.h>
30 #ifdef _CPP_KEYCHAINACL
41 class KeychainAclFactory
44 KeychainAclFactory(CssmAllocator
&alloc
);
45 ~KeychainAclFactory();
47 CssmAllocator
&allocator
;
51 // Create credentials. These functions return AccessCredentials pointers.
53 const AccessCredentials
*nullCredentials();
54 const AccessCredentials
*keychainPromptCredentials();
55 const AccessCredentials
*keychainPromptUnlockCredentials();
56 const AutoCredentials
*passwordChangeCredentials(const CssmData
&password
);
57 const AutoCredentials
*passwordUnlockCredentials(const CssmData
&password
);
61 // Create initial ACLs. Pass those to resource creation functions.
63 AclEntryInput
*keychainPromptOwner(const CssmData
&description
);
64 AclEntryInput
*anyOwner();
65 void release(AclEntryInput
*input
);
69 // Edit ACLs (in external form, as TypedLists)
71 void comment(TypedList
&subject
);
72 void uncomment(TypedList
&subject
);
75 AutoCredentials nullCred
;
76 AutoCredentials kcCred
;
77 AutoCredentials kcUnlockCred
;
81 } // end namespace CssmClient
83 } // end namespace Security
85 #ifdef _CPP_KEYCHAINACL