]> git.saurik.com Git - apple/security.git/blob - securityd/src/agentclient.h
Security-59306.101.1.tar.gz
[apple/security.git] / securityd / src / agentclient.h
1 //
2 // agentclient.h
3 // securityd
4 //
5 // Created by cschmidt on 11/24/14.
6 //
7
8 #ifndef securityd_agentclient_h
9 #define securityd_agentclient_h
10
11 namespace SecurityAgent {
12 enum Reason {
13 noReason = 0, // no reason (not used, used as a NULL)
14 unknownReason, // something else (catch-all internal error)
15
16 // reasons for asking for a new passphrase
17 newDatabase = 11, // need passphrase for a new database
18 changePassphrase, // changing passphrase for existing database
19
20 // reasons for retrying an unlock query
21 invalidPassphrase = 21, // passphrase was wrong
22
23 // reasons for retrying a new passphrase query
24 passphraseIsNull = 31, // empty passphrase
25 passphraseTooSimple, // passphrase is not complex enough
26 passphraseRepeated, // passphrase was used before (must use new one)
27 passphraseUnacceptable, // passphrase unacceptable for some other reason
28 oldPassphraseWrong, // the old passphrase given is wrong
29
30 // reasons for retrying an authorization query
31 userNotInGroup = 41, // authenticated user not in needed group
32 unacceptableUser, // authenticated user unacceptable for some other reason
33
34 // reasons for canceling a staged query
35 tooManyTries = 61, // too many failed attempts to get it right
36 noLongerNeeded, // the queried item is no longer needed
37 keychainAddFailed, // the requested itemed couldn't be added to the keychain
38 generalErrorCancel, // something went wrong so we have to give up now
39 resettingPassword, // The user has indicated that they wish to reset their password
40
41 worldChanged = 101
42 };
43
44 typedef enum {
45 tool = 'TOOL',
46 bundle = 'BNDL',
47 unknown = 'UNKN'
48 } RequestorType;
49 }
50 #endif