]> git.saurik.com Git - apple/security.git/blob - OSX/sec/Security/SecBasePriv.h
Security-57740.20.22.tar.gz
[apple/security.git] / OSX / sec / Security / SecBasePriv.h
1 /*
2 * Copyright (c) 2008-2009,2012-2014 Apple Inc. All Rights Reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24 /*!
25 @header SecBasePriv
26 SecBasePriv contains private error codes from the Security framework.
27 */
28
29 #ifndef _SECURITY_SECBASEPRIV_H_
30 #define _SECURITY_SECBASEPRIV_H_
31
32 #include <Security/SecBase.h>
33
34 __BEGIN_DECLS
35
36 /*******************************************************
37 *** Private OSStatus values unique to Security APIs ***
38 *******************************************************/
39
40 /*
41 Note: the comments that appear after these errors are used to create SecErrorMessages.strings.
42 The comments must not be multi-line, and should be in a form meaningful to an end user. If
43 a different or additional comment is needed, it can be put in the header doc format, or on a
44 line that does not start with errZZZ.
45 */
46
47 enum
48 {
49 errSecReadOnly = -25292, /* This keychain cannot be modified. */
50 errSecNoSuchKeychain = -25294, /* The specified keychain could not be found. */
51 errSecInvalidKeychain = -25295, /* The specified keychain is not a valid keychain file. */
52 errSecDuplicateKeychain = -25296, /* A keychain with the same name already exists. */
53 errSecDuplicateCallback = -25297, /* The specified callback function is already installed. */
54 errSecInvalidCallback = -25298, /* The specified callback function is not valid. */
55 errSecBufferTooSmall = -25301, /* There is not enough memory available to use the specified item. */
56 errSecDataTooLarge = -25302, /* This item contains information which is too large or in a format that cannot be displayed. */
57 errSecNoSuchAttr = errSecParam, // -25303, /* The specified attribute does not exist. */
58 errSecInvalidItemRef = -25304, /* The specified item is no longer valid. It may have been deleted from the keychain. */
59 errSecInvalidSearchRef = -25305, /* Unable to search the current keychain. */
60 errSecNoSuchClass = errSecParam, // -25306, /* The specified item does not appear to be a valid keychain item. */
61 errSecNoDefaultKeychain = -25307, /* A default keychain could not be found. */
62 errSecReadOnlyAttr = -25309, /* The specified attribute could not be modified. */
63 errSecWrongSecVersion = -25310, /* This keychain was created by a different version of the system software and cannot be opened. */
64 errSecKeySizeNotAllowed = errSecParam, // -25311, /* This item specifies a key size which is too large. */
65 errSecNoStorageModule = -25312, /* A required component (data storage module) could not be loaded. You may need to restart your computer. */
66 errSecNoCertificateModule = -25313, /* A required component (certificate module) could not be loaded. You may need to restart your computer. */
67 errSecNoPolicyModule = -25314, /* A required component (policy module) could not be loaded. You may need to restart your computer. */
68 errSecInteractionRequired = -25315, /* User interaction is required, but is currently not allowed. */
69 errSecDataNotAvailable = -25316, /* The contents of this item cannot be retrieved. */
70 errSecDataNotModifiable = -25317, /* The contents of this item cannot be modified. */
71 errSecCreateChainFailed = -25318, /* One or more certificates required to validate this certificate cannot be found. */
72 errSecACLNotSimple = -25240, /* The specified access control list is not in standard (simple) form. */
73 errSecInvalidTrustSetting = -25242, /* The specified trust setting is invalid. */
74 errSecNoAccessForItem = -25243, /* The specified item has no access control. */
75 errSecInvalidOwnerEdit = -25244, /* Invalid attempt to change the owner of this item. */
76 errSecInvalidPrefsDomain = -25319, /* The specified preferences domain is not valid. */
77 errSecTrustNotAvailable = -25245, /* No trust results are available. */
78 errSecUnsupportedFormat = -25256, /* Import/Export format unsupported. */
79 errSecUnknownFormat = -25257, /* Unknown format in import. */
80 errSecKeyIsSensitive = -25258, /* Key material must be wrapped for export. */
81 errSecMultiplePrivKeys = -25259, /* An attempt was made to import multiple private keys. */
82 errSecPassphraseRequired = -25260, /* Passphrase is required for import/export. */
83 errSecInvalidPasswordRef = -25261, /* The password reference was invalid. */
84 errSecInvalidTrustSettings = -25262, /* The Trust Settings record was corrupted. */
85 errSecNoTrustSettings = -25263, /* No Trust Settings were found. */
86 errSecPkcs12VerifyFailure = -25264, /* MAC verification failed during PKCS12 import. */
87 errSecInvalidCertificate = errSecDecode, // -26265, /* This certificate could not be decoded. */
88 errSecNotSigner = -26267, /* A certificate was not signed by its proposed parent. */
89 errSecPolicyDenied = -26270, /* The certificate chain was not trusted due to a policy not accepting it. */
90 errSecInvalidKey = errSecDecode, // -26274, /* The provided key material was not valid. */
91 errSecInternal = -26276, /* An internal error occured in the Security framework. */
92 errSecUnsupportedAlgorithm = errSecUnimplemented, // -26268, /* An unsupported algorithm was encountered. */
93 errSecUnsupportedOperation = errSecUnimplemented, // -26271, /* The operation you requested is not supported by this key. */
94 errSecUnsupportedPadding = errSecParam, // -26273, /* The padding you requested is not supported. */
95 errSecItemInvalidKey = errSecParam, // -34000, /* A string key in dictionary is not one of the supported keys. */
96 errSecItemInvalidKeyType = errSecParam, // -34001, /* A key in a dictionary is neither a CFStringRef nor a CFNumberRef. */
97 errSecItemInvalidValue = errSecParam, // -34002, /* A value in a dictionary is an invalid (or unsupported) CF type. */
98 errSecItemClassMissing = errSecParam, // -34003, /* No kSecItemClass key was specified in a dictionary. */
99 errSecItemMatchUnsupported = errSecParam, // -34004, /* The caller passed one or more kSecMatch keys to a function which does not support matches. */
100 errSecUseItemListUnsupported = errSecParam, // -34005, /* The caller passed in a kSecUseItemList key to a function which does not support it. */
101 errSecUseKeychainUnsupported = errSecParam, // -34006, /* The caller passed in a kSecUseKeychain key to a function which does not support it. */
102 errSecUseKeychainListUnsupported = errSecParam, // -34007, /* The caller passed in a kSecUseKeychainList key to a function which does not support it. */
103 errSecReturnDataUnsupported = errSecParam, // -34008, /* The caller passed in a kSecReturnData key to a function which does not support it. */
104 errSecReturnAttributesUnsupported = errSecParam, // -34009, /* The caller passed in a kSecReturnAttributes key to a function which does not support it. */
105 errSecReturnRefUnsupported = errSecParam, // -34010, /* The caller passed in a kSecReturnRef key to a function which does not support it. */
106 errSecReturnPersistentRefUnsupported = errSecParam, // -34010, /* The caller passed in a kSecReturnPersistentRef key to a function which does not support it. */
107 errSecValueRefUnsupported = errSecParam, // -34012, /* The caller passed in a kSecValueRef key to a function which does not support it. */
108 errSecValuePersistentRefUnsupported = errSecParam, // -34013, /* The caller passed in a kSecValuePersistentRef key to a function which does not support it. */
109 errSecReturnMissingPointer = errSecParam, // -34014, /* The caller passed asked for something to be returned but did not pass in a result pointer. */
110 errSecMatchLimitUnsupported = errSecParam, // -34015, /* The caller passed in a kSecMatchLimit key to a call which does not support limits. */
111 errSecItemIllegalQuery = errSecParam, // -34016, /* The caller passed in a query which contained too many keys. */
112 errSecWaitForCallback = -34017, /* This operation is incomplete, until the callback is invoked (not an error). */
113 errSecMissingEntitlement = -34018, /* Internal error when a required entitlement isn't present. */
114 errSecUpgradePending = -34019, /* Error returned if keychain database needs a schema migration but the device is locked, clients should wait for a device unlock notification and retry the command. */
115
116 errSecMPSignatureInvalid = -25327, /* Signature invalid on MP message */
117 errSecOTRTooOld = -25328, /* Message is too old to use */
118 errSecOTRIDTooNew = -25329, /* Key ID is too new to use! Message from the future? */
119 errSecOTRNotReady = -25331, /* Can't process packets because the session hasn't finished negotiating */
120
121 errSecAuthNeeded = -25330, /* Auth is needed before the requested action can be performed. An array of
122 constraints to be fulfilled is passed inside error.userInfo's 'cons' key. */
123 errSecDeviceIDNeeded = -25332, /* Cannot send IDS messages without having our own IDS ID. */
124 errSecIDSNotRegistered = -25333, /* IDS is not set up or devices are not registered/available within an IDS account. */
125 errSecFailedToSendIDSMessage = -25334, /* Failed to send IDS message. */
126 errSecDeviceIDNoMatch = -25335, /* The provided device ID does not match any device IDs in the ids account. */
127 errSecPeersNotAvailable = -25336, /* No peers in the circle are available/online. */
128 };
129
130
131 __END_DECLS
132
133 #endif /* !_SECURITY_SECBASEPRIV_H_ */