]>
Commit | Line | Data |
---|---|---|
b1ab9ed8 | 1 | /* |
427c49bc A |
2 | * Copyright (c) 2000-2013 Apple Inc. All Rights Reserved. |
3 | * | |
b1ab9ed8 | 4 | * @APPLE_LICENSE_HEADER_START@ |
427c49bc | 5 | * |
b1ab9ed8 A |
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. | |
427c49bc | 12 | * |
b1ab9ed8 A |
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. | |
427c49bc | 20 | * |
b1ab9ed8 A |
21 | * @APPLE_LICENSE_HEADER_END@ |
22 | */ | |
23 | ||
24 | /*! | |
25 | @header SecBase | |
427c49bc | 26 | SecBase contains common declarations for the Security functions. |
b1ab9ed8 A |
27 | */ |
28 | ||
29 | #ifndef _SECURITY_SECBASE_H_ | |
30 | #define _SECURITY_SECBASE_H_ | |
31 | ||
32 | #include <CoreFoundation/CFBase.h> | |
427c49bc A |
33 | #include <AvailabilityMacros.h> |
34 | ||
35 | #if defined(__clang__) | |
36 | #define SEC_DEPRECATED_ATTRIBUTE DEPRECATED_ATTRIBUTE | |
37 | #else | |
38 | #define SEC_DEPRECATED_ATTRIBUTE | |
39 | #endif | |
b1ab9ed8 A |
40 | |
41 | #if defined(__cplusplus) | |
42 | extern "C" { | |
43 | #endif | |
44 | ||
45 | #ifndef __SEC_TYPES__ | |
46 | #define __SEC_TYPES__ | |
47 | ||
48 | /*! | |
49 | @typedef SecKeychainRef | |
50 | @abstract Contains information about a keychain. | |
51 | */ | |
52 | typedef struct OpaqueSecKeychainRef *SecKeychainRef; | |
53 | ||
54 | /*! | |
55 | @typedef SecKeychainItemRef | |
56 | @abstract Contains information about a keychain item. | |
57 | */ | |
58 | typedef struct OpaqueSecKeychainItemRef *SecKeychainItemRef; | |
59 | ||
60 | /*! | |
61 | @typedef SecKeychainSearchRef | |
62 | @abstract Contains information about a keychain search. | |
63 | */ | |
64 | typedef struct OpaqueSecKeychainSearchRef *SecKeychainSearchRef; | |
65 | ||
66 | /*! | |
67 | @typedef SecKeychainAttrType | |
68 | @abstract Represents a keychain attribute type. | |
69 | */ | |
70 | typedef OSType SecKeychainAttrType; | |
71 | ||
72 | /*! | |
73 | @struct SecKeychainAttribute | |
427c49bc | 74 | @abstract Contains keychain attributes. |
b1ab9ed8 A |
75 | @field tag A 4-byte attribute tag. |
76 | @field length The length of the buffer pointed to by data. | |
77 | @field data A pointer to the attribute data. | |
78 | */ | |
427c49bc | 79 | struct SecKeychainAttribute |
b1ab9ed8 A |
80 | { |
81 | SecKeychainAttrType tag; | |
82 | UInt32 length; | |
83 | void *data; | |
84 | }; | |
85 | typedef struct SecKeychainAttribute SecKeychainAttribute; | |
86 | ||
87 | /*! | |
88 | @typedef SecKeychainAttributePtr | |
89 | @abstract Represents a pointer to a keychain attribute structure. | |
90 | */ | |
91 | typedef SecKeychainAttribute *SecKeychainAttributePtr; | |
92 | ||
93 | /*! | |
94 | @typedef SecKeychainAttributeList | |
95 | @abstract Represents a list of keychain attributes. | |
96 | @field count An unsigned 32-bit integer that represents the number of keychain attributes in the array. | |
97 | @field attr A pointer to the first keychain attribute in the array. | |
98 | */ | |
427c49bc | 99 | struct SecKeychainAttributeList |
b1ab9ed8 A |
100 | { |
101 | UInt32 count; | |
102 | SecKeychainAttribute *attr; | |
103 | }; | |
104 | typedef struct SecKeychainAttributeList SecKeychainAttributeList; | |
105 | ||
106 | /*! | |
107 | @typedef SecKeychainStatus | |
108 | @abstract Represents the status of a keychain. | |
109 | */ | |
110 | typedef UInt32 SecKeychainStatus; | |
111 | #endif | |
112 | ||
113 | /*! | |
114 | @typedef SecTrustedApplicationRef | |
115 | @abstract Contains information about a trusted application. | |
116 | */ | |
117 | typedef struct OpaqueSecTrustedApplicationRef *SecTrustedApplicationRef; | |
118 | ||
119 | /*! | |
120 | @typedef SecPolicyRef | |
121 | @abstract Contains information about a policy. | |
122 | */ | |
123 | typedef struct OpaqueSecPolicyRef *SecPolicyRef; | |
124 | ||
125 | /*! | |
126 | @typedef SecCertificateRef | |
127 | @abstract Contains information about a certificate. | |
128 | */ | |
129 | typedef struct OpaqueSecCertificateRef *SecCertificateRef; | |
130 | ||
131 | /*! | |
132 | @typedef SecAccessRef | |
133 | @abstract Contains information about an access. | |
134 | */ | |
135 | typedef struct OpaqueSecAccessRef *SecAccessRef; | |
136 | ||
137 | /*! | |
138 | @typedef SecIdentityRef | |
139 | @abstract Contains information about an identity. | |
140 | */ | |
141 | typedef struct OpaqueSecIdentityRef *SecIdentityRef; | |
142 | ||
143 | /*! | |
144 | @typedef SecKeyRef | |
145 | @abstract Contains information about a key. | |
146 | */ | |
147 | typedef struct OpaqueSecKeyRef *SecKeyRef; | |
148 | ||
149 | /*! | |
150 | @typedef SecACLRef | |
151 | @abstract Contains information about an access control list (ACL) entry. | |
152 | */ | |
153 | typedef struct OpaqueSecTrustRef *SecACLRef; | |
154 | ||
155 | /*! | |
156 | @typedef SecPasswordRef | |
157 | @abstract Contains information about a password. | |
158 | */ | |
159 | typedef struct OpaqueSecPasswordRef *SecPasswordRef; | |
160 | ||
161 | /*! | |
162 | @typedef SecKeychainAttributeInfo | |
427c49bc A |
163 | @abstract Represents an attribute. |
164 | @field count The number of tag-format pairs in the respective arrays. | |
b1ab9ed8 A |
165 | @field tag A pointer to the first attribute tag in the array. |
166 | @field format A pointer to the first CSSM_DB_ATTRIBUTE_FORMAT in the array. | |
427c49bc | 167 | @discussion Each tag and format item form a pair. |
b1ab9ed8 A |
168 | */ |
169 | struct SecKeychainAttributeInfo | |
170 | { | |
171 | UInt32 count; | |
172 | UInt32 *tag; | |
173 | UInt32 *format; | |
174 | }; | |
175 | typedef struct SecKeychainAttributeInfo SecKeychainAttributeInfo; | |
176 | ||
177 | /*! | |
178 | @function SecCopyErrorMessageString | |
179 | @abstract Returns a string describing the specified error result code. | |
180 | @param status An error result code of type OSStatus or CSSM_RETURN, as returned by a Security or CSSM function. | |
181 | @reserved Reserved for future use. Your code should pass NULL in this parameter. | |
182 | @result A reference to an error string, or NULL if no error string is available for the specified result code. Your code must release this reference by calling the CFRelease function. | |
183 | */ | |
184 | CFStringRef SecCopyErrorMessageString(OSStatus status, void *reserved); | |
185 | ||
186 | /*! | |
427c49bc | 187 | @enum Security Error Codes |
b1ab9ed8 A |
188 | @abstract Result codes returned from Security framework functions. |
189 | @constant errSecSuccess No error. | |
190 | @constant errSecUnimplemented Function or operation not implemented. | |
427c49bc A |
191 | @constant errSecDskFull Disk Full error. |
192 | @constant errSecIO I/O error. | |
b1ab9ed8 | 193 | @constant errSecParam One or more parameters passed to a function were not valid. |
427c49bc | 194 | @constant errSecWrPerm Write permissions error. |
b1ab9ed8 | 195 | @constant errSecAllocate Failed to allocate memory. |
427c49bc A |
196 | @constant errSecUserCanceled User canceled the operation. |
197 | @constant errSecBadReq Bad parameter or invalid state for operation. | |
198 | @constant errSecInternalComponent | |
199 | @constant errSecCoreFoundationUnknown | |
b1ab9ed8 A |
200 | @constant errSecNotAvailable No keychain is available. |
201 | @constant errSecReadOnly Read only error. | |
202 | @constant errSecAuthFailed Authorization/Authentication failed. | |
203 | @constant errSecNoSuchKeychain The keychain does not exist. | |
204 | @constant errSecInvalidKeychain The keychain is not valid. | |
205 | @constant errSecDuplicateKeychain A keychain with the same name already exists. | |
206 | @constant errSecDuplicateCallback The specified callback is already installed. | |
207 | @constant errSecInvalidCallback The specified callback is not valid. | |
208 | @constant errSecDuplicateItem The item already exists. | |
209 | @constant errSecItemNotFound The item cannot be found. | |
210 | @constant errSecBufferTooSmall The buffer is too small. | |
211 | @constant errSecDataTooLarge The data is too large. | |
212 | @constant errSecNoSuchAttr The attribute does not exist. | |
213 | @constant errSecInvalidItemRef The item reference is invalid. | |
214 | @constant errSecInvalidSearchRef The search reference is invalid. | |
215 | @constant errSecNoSuchClass The keychain item class does not exist. | |
216 | @constant errSecNoDefaultKeychain A default keychain does not exist. | |
217 | @constant errSecInteractionNotAllowed User interaction is not allowed. | |
218 | @constant errSecReadOnlyAttr The attribute is read only. | |
219 | @constant errSecWrongSecVersion The version is incorrect. | |
220 | @constant errSecKeySizeNotAllowed The key size is not allowed. | |
221 | @constant errSecNoStorageModule There is no storage module available. | |
222 | @constant errSecNoCertificateModule There is no certificate module available. | |
223 | @constant errSecNoPolicyModule There is no policy module available. | |
224 | @constant errSecInteractionRequired User interaction is required. | |
225 | @constant errSecDataNotAvailable The data is not available. | |
226 | @constant errSecDataNotModifiable The data is not modifiable. | |
227 | @constant errSecCreateChainFailed The attempt to create a certificate chain failed. | |
228 | @constant errSecACLNotSimple The access control list is not in standard simple form. | |
229 | @constant errSecPolicyNotFound The policy specified cannot be found. | |
230 | @constant errSecInvalidTrustSetting The specified trust setting is invalid. | |
231 | @constant errSecNoAccessForItem The specified item has no access control. | |
232 | @constant errSecInvalidOwnerEdit Invalid attempt to change the owner of this item. | |
233 | @constant errSecTrustNotAvailable No trust results are available. | |
234 | @constant errSecUnsupportedFormat Import/Export format unsupported. | |
235 | @constant errSecUnknownFormat Unknown format in import. | |
236 | @constant errSecKeyIsSensitive Key material must be wrapped for export. | |
237 | @constant errSecMultiplePrivKeys An attempt was made to import multiple private keys. | |
238 | @constant errSecPassphraseRequired Passphrase is required for import/export. | |
239 | @constant errSecInvalidPasswordRef The password reference was invalid. | |
240 | @constant errSecInvalidTrustSettings The Trust Settings Record was corrupted. | |
427c49bc | 241 | @constant errSecNoTrustSettings No Trust Settings were found. |
b1ab9ed8 A |
242 | @constant errSecPkcs12VerifyFailure MAC verification failed during PKCS12 Import. |
243 | @constant errSecDecode Unable to decode the provided data. | |
244 | ||
245 | @discussion The assigned error space is discontinuous: e.g. -25240..-25279, -25290..-25329, -68608..-67585, and so on. | |
246 | */ | |
247 | ||
248 | /* | |
249 | Note: the comments that appear after these errors are used to create SecErrorMessages.strings. | |
250 | The comments must not be multi-line, and should be in a form meaningful to an end user. If | |
251 | a different or additional comment is needed, it can be put in the header doc format, or on a | |
252 | line that does not start with errZZZ. | |
253 | */ | |
254 | ||
255 | enum | |
256 | { | |
257 | errSecSuccess = 0, /* No error. */ | |
258 | errSecUnimplemented = -4, /* Function or operation not implemented. */ | |
427c49bc A |
259 | errSecDskFull = -34, |
260 | errSecIO = -36, /*I/O error (bummers)*/ | |
261 | ||
b1ab9ed8 | 262 | errSecParam = -50, /* One or more parameters passed to a function were not valid. */ |
427c49bc | 263 | errSecWrPerm = -61, /* write permissions error*/ |
b1ab9ed8 | 264 | errSecAllocate = -108, /* Failed to allocate memory. */ |
427c49bc A |
265 | errSecUserCanceled = -128, /* User canceled the operation. */ |
266 | errSecBadReq = -909, /* Bad parameter or invalid state for operation. */ | |
267 | ||
268 | errSecInternalComponent = -2070, | |
269 | errSecCoreFoundationUnknown = -4960, | |
b1ab9ed8 A |
270 | |
271 | errSecNotAvailable = -25291, /* No keychain is available. You may need to restart your computer. */ | |
272 | errSecReadOnly = -25292, /* This keychain cannot be modified. */ | |
273 | errSecAuthFailed = -25293, /* The user name or passphrase you entered is not correct. */ | |
274 | errSecNoSuchKeychain = -25294, /* The specified keychain could not be found. */ | |
275 | errSecInvalidKeychain = -25295, /* The specified keychain is not a valid keychain file. */ | |
276 | errSecDuplicateKeychain = -25296, /* A keychain with the same name already exists. */ | |
277 | errSecDuplicateCallback = -25297, /* The specified callback function is already installed. */ | |
278 | errSecInvalidCallback = -25298, /* The specified callback function is not valid. */ | |
279 | errSecDuplicateItem = -25299, /* The specified item already exists in the keychain. */ | |
280 | errSecItemNotFound = -25300, /* The specified item could not be found in the keychain. */ | |
281 | errSecBufferTooSmall = -25301, /* There is not enough memory available to use the specified item. */ | |
282 | errSecDataTooLarge = -25302, /* This item contains information which is too large or in a format that cannot be displayed. */ | |
283 | errSecNoSuchAttr = -25303, /* The specified attribute does not exist. */ | |
284 | errSecInvalidItemRef = -25304, /* The specified item is no longer valid. It may have been deleted from the keychain. */ | |
285 | errSecInvalidSearchRef = -25305, /* Unable to search the current keychain. */ | |
286 | errSecNoSuchClass = -25306, /* The specified item does not appear to be a valid keychain item. */ | |
287 | errSecNoDefaultKeychain = -25307, /* A default keychain could not be found. */ | |
288 | errSecInteractionNotAllowed = -25308, /* User interaction is not allowed. */ | |
289 | errSecReadOnlyAttr = -25309, /* The specified attribute could not be modified. */ | |
290 | errSecWrongSecVersion = -25310, /* This keychain was created by a different version of the system software and cannot be opened. */ | |
291 | errSecKeySizeNotAllowed = -25311, /* This item specifies a key size which is too large. */ | |
292 | errSecNoStorageModule = -25312, /* A required component (data storage module) could not be loaded. You may need to restart your computer. */ | |
293 | errSecNoCertificateModule = -25313, /* A required component (certificate module) could not be loaded. You may need to restart your computer. */ | |
294 | errSecNoPolicyModule = -25314, /* A required component (policy module) could not be loaded. You may need to restart your computer. */ | |
295 | errSecInteractionRequired = -25315, /* User interaction is required, but is currently not allowed. */ | |
296 | errSecDataNotAvailable = -25316, /* The contents of this item cannot be retrieved. */ | |
297 | errSecDataNotModifiable = -25317, /* The contents of this item cannot be modified. */ | |
298 | errSecCreateChainFailed = -25318, /* One or more certificates required to validate this certificate cannot be found. */ | |
299 | errSecInvalidPrefsDomain = -25319, /* The specified preferences domain is not valid. */ | |
427c49bc A |
300 | errSecInDarkWake = -25320, /* In dark wake, no UI possible */ |
301 | ||
b1ab9ed8 A |
302 | errSecACLNotSimple = -25240, /* The specified access control list is not in standard (simple) form. */ |
303 | errSecPolicyNotFound = -25241, /* The specified policy cannot be found. */ | |
304 | errSecInvalidTrustSetting = -25242, /* The specified trust setting is invalid. */ | |
305 | errSecNoAccessForItem = -25243, /* The specified item has no access control. */ | |
306 | errSecInvalidOwnerEdit = -25244, /* Invalid attempt to change the owner of this item. */ | |
307 | errSecTrustNotAvailable = -25245, /* No trust results are available. */ | |
308 | errSecUnsupportedFormat = -25256, /* Import/Export format unsupported. */ | |
309 | errSecUnknownFormat = -25257, /* Unknown format in import. */ | |
310 | errSecKeyIsSensitive = -25258, /* Key material must be wrapped for export. */ | |
311 | errSecMultiplePrivKeys = -25259, /* An attempt was made to import multiple private keys. */ | |
312 | errSecPassphraseRequired = -25260, /* Passphrase is required for import/export. */ | |
313 | errSecInvalidPasswordRef = -25261, /* The password reference was invalid. */ | |
314 | errSecInvalidTrustSettings = -25262, /* The Trust Settings Record was corrupted. */ | |
315 | errSecNoTrustSettings = -25263, /* No Trust Settings were found. */ | |
316 | errSecPkcs12VerifyFailure = -25264, /* MAC verification failed during PKCS12 import (wrong password?) */ | |
317 | errSecNotSigner = -26267, /* A certificate was not signed by its proposed parent. */ | |
427c49bc | 318 | |
b1ab9ed8 A |
319 | errSecDecode = -26275, /* Unable to decode the provided data. */ |
320 | ||
321 | errSecServiceNotAvailable = -67585, /* The required service is not available. */ | |
322 | errSecInsufficientClientID = -67586, /* The client ID is not correct. */ | |
323 | errSecDeviceReset = -67587, /* A device reset has occurred. */ | |
324 | errSecDeviceFailed = -67588, /* A device failure has occurred. */ | |
325 | errSecAppleAddAppACLSubject = -67589, /* Adding an application ACL subject failed. */ | |
326 | errSecApplePublicKeyIncomplete = -67590, /* The public key is incomplete. */ | |
327 | errSecAppleSignatureMismatch = -67591, /* A signature mismatch has occurred. */ | |
328 | errSecAppleInvalidKeyStartDate = -67592, /* The specified key has an invalid start date. */ | |
329 | errSecAppleInvalidKeyEndDate = -67593, /* The specified key has an invalid end date. */ | |
330 | errSecConversionError = -67594, /* A conversion error has occurred. */ | |
331 | errSecAppleSSLv2Rollback = -67595, /* A SSLv2 rollback error has occurred. */ | |
332 | errSecDiskFull = -34, /* The disk is full. */ | |
333 | errSecQuotaExceeded = -67596, /* The quota was exceeded. */ | |
334 | errSecFileTooBig = -67597, /* The file is too big. */ | |
335 | errSecInvalidDatabaseBlob = -67598, /* The specified database has an invalid blob. */ | |
336 | errSecInvalidKeyBlob = -67599, /* The specified database has an invalid key blob. */ | |
427c49bc A |
337 | errSecIncompatibleDatabaseBlob = -67600, /* The specified database has an incompatible blob. */ |
338 | errSecIncompatibleKeyBlob = -67601, /* The specified database has an incompatible key blob. */ | |
b1ab9ed8 A |
339 | errSecHostNameMismatch = -67602, /* A host name mismatch has occurred. */ |
340 | errSecUnknownCriticalExtensionFlag = -67603, /* There is an unknown critical extension flag. */ | |
341 | errSecNoBasicConstraints = -67604, /* No basic constraints were found. */ | |
342 | errSecNoBasicConstraintsCA = -67605, /* No basic CA constraints were found. */ | |
343 | errSecInvalidAuthorityKeyID = -67606, /* The authority key ID is not valid. */ | |
344 | errSecInvalidSubjectKeyID = -67607, /* The subject key ID is not valid. */ | |
345 | errSecInvalidKeyUsageForPolicy = -67608, /* The key usage is not valid for the specified policy. */ | |
346 | errSecInvalidExtendedKeyUsage = -67609, /* The extended key usage is not valid. */ | |
347 | errSecInvalidIDLinkage = -67610, /* The ID linkage is not valid. */ | |
348 | errSecPathLengthConstraintExceeded = -67611, /* The path length constraint was exceeded. */ | |
349 | errSecInvalidRoot = -67612, /* The root or anchor certificate is not valid. */ | |
350 | errSecCRLExpired = -67613, /* The CRL has expired. */ | |
351 | errSecCRLNotValidYet = -67614, /* The CRL is not yet valid. */ | |
352 | errSecCRLNotFound = -67615, /* The CRL was not found. */ | |
353 | errSecCRLServerDown = -67616, /* The CRL server is down. */ | |
354 | errSecCRLBadURI = -67617, /* The CRL has a bad Uniform Resource Identifier. */ | |
355 | errSecUnknownCertExtension = -67618, /* An unknown certificate extension was encountered. */ | |
356 | errSecUnknownCRLExtension = -67619, /* An unknown CRL extension was encountered. */ | |
357 | errSecCRLNotTrusted = -67620, /* The CRL is not trusted. */ | |
358 | errSecCRLPolicyFailed = -67621, /* The CRL policy failed. */ | |
359 | errSecIDPFailure = -67622, /* The issuing distribution point was not valid. */ | |
360 | errSecSMIMEEmailAddressesNotFound = -67623, /* An email address mismatch was encountered. */ | |
361 | errSecSMIMEBadExtendedKeyUsage = -67624, /* The appropriate extended key usage for SMIME was not found. */ | |
362 | errSecSMIMEBadKeyUsage = -67625, /* The key usage is not compatible with SMIME. */ | |
363 | errSecSMIMEKeyUsageNotCritical = -67626, /* The key usage extension is not marked as critical. */ | |
364 | errSecSMIMENoEmailAddress = -67627, /* No email address was found in the certificate. */ | |
365 | errSecSMIMESubjAltNameNotCritical = -67628, /* The subject alternative name extension is not marked as critical. */ | |
366 | errSecSSLBadExtendedKeyUsage = -67629, /* The appropriate extended key usage for SSL was not found. */ | |
367 | errSecOCSPBadResponse = -67630, /* The OCSP response was incorrect or could not be parsed. */ | |
368 | errSecOCSPBadRequest = -67631, /* The OCSP request was incorrect or could not be parsed. */ | |
369 | errSecOCSPUnavailable = -67632, /* OCSP service is unavailable. */ | |
370 | errSecOCSPStatusUnrecognized = -67633, /* The OCSP server did not recognize this certificate. */ | |
371 | errSecEndOfData = -67634, /* An end-of-data was detected. */ | |
372 | errSecIncompleteCertRevocationCheck = -67635, /* An incomplete certificate revocation check occurred. */ | |
373 | errSecNetworkFailure = -67636, /* A network failure occurred. */ | |
374 | errSecOCSPNotTrustedToAnchor = -67637, /* The OCSP response was not trusted to a root or anchor certificate. */ | |
375 | errSecRecordModified = -67638, /* The record was modified. */ | |
376 | errSecOCSPSignatureError = -67639, /* The OCSP response had an invalid signature. */ | |
377 | errSecOCSPNoSigner = -67640, /* The OCSP response had no signer. */ | |
378 | errSecOCSPResponderMalformedReq = -67641, /* The OCSP responder was given a malformed request. */ | |
379 | errSecOCSPResponderInternalError = -67642, /* The OCSP responder encountered an internal error. */ | |
380 | errSecOCSPResponderTryLater = -67643, /* The OCSP responder is busy, try again later. */ | |
381 | errSecOCSPResponderSignatureRequired = -67644, /* The OCSP responder requires a signature. */ | |
382 | errSecOCSPResponderUnauthorized = -67645, /* The OCSP responder rejected this request as unauthorized. */ | |
383 | errSecOCSPResponseNonceMismatch = -67646, /* The OCSP response nonce did not match the request. */ | |
384 | errSecCodeSigningBadCertChainLength = -67647, /* Code signing encountered an incorrect certificate chain length. */ | |
385 | errSecCodeSigningNoBasicConstraints = -67648, /* Code signing found no basic constraints. */ | |
386 | errSecCodeSigningBadPathLengthConstraint= -67649, /* Code signing encountered an incorrect path length constraint. */ | |
387 | errSecCodeSigningNoExtendedKeyUsage = -67650, /* Code signing found no extended key usage. */ | |
388 | errSecCodeSigningDevelopment = -67651, /* Code signing indicated use of a development-only certificate. */ | |
389 | errSecResourceSignBadCertChainLength = -67652, /* Resource signing has encountered an incorrect certificate chain length. */ | |
390 | errSecResourceSignBadExtKeyUsage = -67653, /* Resource signing has encountered an error in the extended key usage. */ | |
391 | errSecTrustSettingDeny = -67654, /* The trust setting for this policy was set to Deny. */ | |
392 | errSecInvalidSubjectName = -67655, /* An invalid certificate subject name was encountered. */ | |
393 | errSecUnknownQualifiedCertStatement = -67656, /* An unknown qualified certificate statement was encountered. */ | |
394 | errSecMobileMeRequestQueued = -67657, /* The MobileMe request will be sent during the next connection. */ | |
395 | errSecMobileMeRequestRedirected = -67658, /* The MobileMe request was redirected. */ | |
396 | errSecMobileMeServerError = -67659, /* A MobileMe server error occurred. */ | |
397 | errSecMobileMeServerNotAvailable = -67660, /* The MobileMe server is not available. */ | |
398 | errSecMobileMeServerAlreadyExists = -67661, /* The MobileMe server reported that the item already exists. */ | |
399 | errSecMobileMeServerServiceErr = -67662, /* A MobileMe service error has occurred. */ | |
400 | errSecMobileMeRequestAlreadyPending = -67663, /* A MobileMe request is already pending. */ | |
401 | errSecMobileMeNoRequestPending = -67664, /* MobileMe has no request pending. */ | |
402 | errSecMobileMeCSRVerifyFailure = -67665, /* A MobileMe CSR verification failure has occurred. */ | |
403 | errSecMobileMeFailedConsistencyCheck = -67666, /* MobileMe has found a failed consistency check. */ | |
404 | errSecNotInitialized = -67667, /* A function was called without initializing CSSM. */ | |
405 | errSecInvalidHandleUsage = -67668, /* The CSSM handle does not match with the service type. */ | |
406 | errSecPVCReferentNotFound = -67669, /* A reference to the calling module was not found in the list of authorized callers. */ | |
427c49bc | 407 | errSecFunctionIntegrityFail = -67670, /* A function address was not within the verified module. */ |
b1ab9ed8 A |
408 | errSecInternalError = -67671, /* An internal error has occurred. */ |
409 | errSecMemoryError = -67672, /* A memory error has occurred. */ | |
410 | errSecInvalidData = -67673, /* Invalid data was encountered. */ | |
411 | errSecMDSError = -67674, /* A Module Directory Service error has occurred. */ | |
412 | errSecInvalidPointer = -67675, /* An invalid pointer was encountered. */ | |
413 | errSecSelfCheckFailed = -67676, /* Self-check has failed. */ | |
414 | errSecFunctionFailed = -67677, /* A function has failed. */ | |
415 | errSecModuleManifestVerifyFailed = -67678, /* A module manifest verification failure has occurred. */ | |
416 | errSecInvalidGUID = -67679, /* An invalid GUID was encountered. */ | |
417 | errSecInvalidHandle = -67680, /* An invalid handle was encountered. */ | |
418 | errSecInvalidDBList = -67681, /* An invalid DB list was encountered. */ | |
419 | errSecInvalidPassthroughID = -67682, /* An invalid passthrough ID was encountered. */ | |
420 | errSecInvalidNetworkAddress = -67683, /* An invalid network address was encountered. */ | |
421 | errSecCRLAlreadySigned = -67684, /* The certificate revocation list is already signed. */ | |
422 | errSecInvalidNumberOfFields = -67685, /* An invalid number of fields were encountered. */ | |
423 | errSecVerificationFailure = -67686, /* A verification failure occurred. */ | |
424 | errSecUnknownTag = -67687, /* An unknown tag was encountered. */ | |
425 | errSecInvalidSignature = -67688, /* An invalid signature was encountered. */ | |
426 | errSecInvalidName = -67689, /* An invalid name was encountered. */ | |
427 | errSecInvalidCertificateRef = -67690, /* An invalid certificate reference was encountered. */ | |
428 | errSecInvalidCertificateGroup = -67691, /* An invalid certificate group was encountered. */ | |
429 | errSecTagNotFound = -67692, /* The specified tag was not found. */ | |
430 | errSecInvalidQuery = -67693, /* The specified query was not valid. */ | |
431 | errSecInvalidValue = -67694, /* An invalid value was detected. */ | |
432 | errSecCallbackFailed = -67695, /* A callback has failed. */ | |
433 | errSecACLDeleteFailed = -67696, /* An ACL delete operation has failed. */ | |
434 | errSecACLReplaceFailed = -67697, /* An ACL replace operation has failed. */ | |
435 | errSecACLAddFailed = -67698, /* An ACL add operation has failed. */ | |
436 | errSecACLChangeFailed = -67699, /* An ACL change operation has failed. */ | |
437 | errSecInvalidAccessCredentials = -67700, /* Invalid access credentials were encountered. */ | |
438 | errSecInvalidRecord = -67701, /* An invalid record was encountered. */ | |
439 | errSecInvalidACL = -67702, /* An invalid ACL was encountered. */ | |
440 | errSecInvalidSampleValue = -67703, /* An invalid sample value was encountered. */ | |
441 | errSecIncompatibleVersion = -67704, /* An incompatible version was encountered. */ | |
442 | errSecPrivilegeNotGranted = -67705, /* The privilege was not granted. */ | |
443 | errSecInvalidScope = -67706, /* An invalid scope was encountered. */ | |
444 | errSecPVCAlreadyConfigured = -67707, /* The PVC is already configured. */ | |
445 | errSecInvalidPVC = -67708, /* An invalid PVC was encountered. */ | |
446 | errSecEMMLoadFailed = -67709, /* The EMM load has failed. */ | |
447 | errSecEMMUnloadFailed = -67710, /* The EMM unload has failed. */ | |
448 | errSecAddinLoadFailed = -67711, /* The add-in load operation has failed. */ | |
449 | errSecInvalidKeyRef = -67712, /* An invalid key was encountered. */ | |
450 | errSecInvalidKeyHierarchy = -67713, /* An invalid key hierarchy was encountered. */ | |
451 | errSecAddinUnloadFailed = -67714, /* The add-in unload operation has failed. */ | |
452 | errSecLibraryReferenceNotFound = -67715, /* A library reference was not found. */ | |
453 | errSecInvalidAddinFunctionTable = -67716, /* An invalid add-in function table was encountered. */ | |
454 | errSecInvalidServiceMask = -67717, /* An invalid service mask was encountered. */ | |
455 | errSecModuleNotLoaded = -67718, /* A module was not loaded. */ | |
456 | errSecInvalidSubServiceID = -67719, /* An invalid subservice ID was encountered. */ | |
457 | errSecAttributeNotInContext = -67720, /* An attribute was not in the context. */ | |
458 | errSecModuleManagerInitializeFailed = -67721, /* A module failed to initialize. */ | |
459 | errSecModuleManagerNotFound = -67722, /* A module was not found. */ | |
460 | errSecEventNotificationCallbackNotFound = -67723, /* An event notification callback was not found. */ | |
461 | errSecInputLengthError = -67724, /* An input length error was encountered. */ | |
462 | errSecOutputLengthError = -67725, /* An output length error was encountered. */ | |
463 | errSecPrivilegeNotSupported = -67726, /* The privilege is not supported. */ | |
464 | errSecDeviceError = -67727, /* A device error was encountered. */ | |
465 | errSecAttachHandleBusy = -67728, /* The CSP handle was busy. */ | |
466 | errSecNotLoggedIn = -67729, /* You are not logged in. */ | |
467 | errSecAlgorithmMismatch = -67730, /* An algorithm mismatch was encountered. */ | |
468 | errSecKeyUsageIncorrect = -67731, /* The key usage is incorrect. */ | |
469 | errSecKeyBlobTypeIncorrect = -67732, /* The key blob type is incorrect. */ | |
470 | errSecKeyHeaderInconsistent = -67733, /* The key header is inconsistent. */ | |
471 | errSecUnsupportedKeyFormat = -67734, /* The key header format is not supported. */ | |
472 | errSecUnsupportedKeySize = -67735, /* The key size is not supported. */ | |
473 | errSecInvalidKeyUsageMask = -67736, /* The key usage mask is not valid. */ | |
474 | errSecUnsupportedKeyUsageMask = -67737, /* The key usage mask is not supported. */ | |
475 | errSecInvalidKeyAttributeMask = -67738, /* The key attribute mask is not valid. */ | |
476 | errSecUnsupportedKeyAttributeMask = -67739, /* The key attribute mask is not supported. */ | |
477 | errSecInvalidKeyLabel = -67740, /* The key label is not valid. */ | |
478 | errSecUnsupportedKeyLabel = -67741, /* The key label is not supported. */ | |
479 | errSecInvalidKeyFormat = -67742, /* The key format is not valid. */ | |
480 | errSecUnsupportedVectorOfBuffers = -67743, /* The vector of buffers is not supported. */ | |
481 | errSecInvalidInputVector = -67744, /* The input vector is not valid. */ | |
482 | errSecInvalidOutputVector = -67745, /* The output vector is not valid. */ | |
483 | errSecInvalidContext = -67746, /* An invalid context was encountered. */ | |
484 | errSecInvalidAlgorithm = -67747, /* An invalid algorithm was encountered. */ | |
485 | errSecInvalidAttributeKey = -67748, /* A key attribute was not valid. */ | |
486 | errSecMissingAttributeKey = -67749, /* A key attribute was missing. */ | |
487 | errSecInvalidAttributeInitVector = -67750, /* An init vector attribute was not valid. */ | |
488 | errSecMissingAttributeInitVector = -67751, /* An init vector attribute was missing. */ | |
489 | errSecInvalidAttributeSalt = -67752, /* A salt attribute was not valid. */ | |
490 | errSecMissingAttributeSalt = -67753, /* A salt attribute was missing. */ | |
491 | errSecInvalidAttributePadding = -67754, /* A padding attribute was not valid. */ | |
492 | errSecMissingAttributePadding = -67755, /* A padding attribute was missing. */ | |
493 | errSecInvalidAttributeRandom = -67756, /* A random number attribute was not valid. */ | |
494 | errSecMissingAttributeRandom = -67757, /* A random number attribute was missing. */ | |
495 | errSecInvalidAttributeSeed = -67758, /* A seed attribute was not valid. */ | |
496 | errSecMissingAttributeSeed = -67759, /* A seed attribute was missing. */ | |
497 | errSecInvalidAttributePassphrase = -67760, /* A passphrase attribute was not valid. */ | |
498 | errSecMissingAttributePassphrase = -67761, /* A passphrase attribute was missing. */ | |
499 | errSecInvalidAttributeKeyLength = -67762, /* A key length attribute was not valid. */ | |
500 | errSecMissingAttributeKeyLength = -67763, /* A key length attribute was missing. */ | |
501 | errSecInvalidAttributeBlockSize = -67764, /* A block size attribute was not valid. */ | |
502 | errSecMissingAttributeBlockSize = -67765, /* A block size attribute was missing. */ | |
503 | errSecInvalidAttributeOutputSize = -67766, /* An output size attribute was not valid. */ | |
504 | errSecMissingAttributeOutputSize = -67767, /* An output size attribute was missing. */ | |
505 | errSecInvalidAttributeRounds = -67768, /* The number of rounds attribute was not valid. */ | |
506 | errSecMissingAttributeRounds = -67769, /* The number of rounds attribute was missing. */ | |
507 | errSecInvalidAlgorithmParms = -67770, /* An algorithm parameters attribute was not valid. */ | |
508 | errSecMissingAlgorithmParms = -67771, /* An algorithm parameters attribute was missing. */ | |
509 | errSecInvalidAttributeLabel = -67772, /* A label attribute was not valid. */ | |
510 | errSecMissingAttributeLabel = -67773, /* A label attribute was missing. */ | |
511 | errSecInvalidAttributeKeyType = -67774, /* A key type attribute was not valid. */ | |
512 | errSecMissingAttributeKeyType = -67775, /* A key type attribute was missing. */ | |
513 | errSecInvalidAttributeMode = -67776, /* A mode attribute was not valid. */ | |
514 | errSecMissingAttributeMode = -67777, /* A mode attribute was missing. */ | |
515 | errSecInvalidAttributeEffectiveBits = -67778, /* An effective bits attribute was not valid. */ | |
516 | errSecMissingAttributeEffectiveBits = -67779, /* An effective bits attribute was missing. */ | |
517 | errSecInvalidAttributeStartDate = -67780, /* A start date attribute was not valid. */ | |
518 | errSecMissingAttributeStartDate = -67781, /* A start date attribute was missing. */ | |
519 | errSecInvalidAttributeEndDate = -67782, /* An end date attribute was not valid. */ | |
520 | errSecMissingAttributeEndDate = -67783, /* An end date attribute was missing. */ | |
521 | errSecInvalidAttributeVersion = -67784, /* A version attribute was not valid. */ | |
522 | errSecMissingAttributeVersion = -67785, /* A version attribute was missing. */ | |
523 | errSecInvalidAttributePrime = -67786, /* A prime attribute was not valid. */ | |
524 | errSecMissingAttributePrime = -67787, /* A prime attribute was missing. */ | |
525 | errSecInvalidAttributeBase = -67788, /* A base attribute was not valid. */ | |
526 | errSecMissingAttributeBase = -67789, /* A base attribute was missing. */ | |
527 | errSecInvalidAttributeSubprime = -67790, /* A subprime attribute was not valid. */ | |
528 | errSecMissingAttributeSubprime = -67791, /* A subprime attribute was missing. */ | |
529 | errSecInvalidAttributeIterationCount = -67792, /* An iteration count attribute was not valid. */ | |
530 | errSecMissingAttributeIterationCount = -67793, /* An iteration count attribute was missing. */ | |
531 | errSecInvalidAttributeDLDBHandle = -67794, /* A database handle attribute was not valid. */ | |
532 | errSecMissingAttributeDLDBHandle = -67795, /* A database handle attribute was missing. */ | |
533 | errSecInvalidAttributeAccessCredentials = -67796, /* An access credentials attribute was not valid. */ | |
534 | errSecMissingAttributeAccessCredentials = -67797, /* An access credentials attribute was missing. */ | |
535 | errSecInvalidAttributePublicKeyFormat = -67798, /* A public key format attribute was not valid. */ | |
536 | errSecMissingAttributePublicKeyFormat = -67799, /* A public key format attribute was missing. */ | |
537 | errSecInvalidAttributePrivateKeyFormat = -67800, /* A private key format attribute was not valid. */ | |
538 | errSecMissingAttributePrivateKeyFormat = -67801, /* A private key format attribute was missing. */ | |
539 | errSecInvalidAttributeSymmetricKeyFormat = -67802, /* A symmetric key format attribute was not valid. */ | |
540 | errSecMissingAttributeSymmetricKeyFormat = -67803, /* A symmetric key format attribute was missing. */ | |
541 | errSecInvalidAttributeWrappedKeyFormat = -67804, /* A wrapped key format attribute was not valid. */ | |
542 | errSecMissingAttributeWrappedKeyFormat = -67805, /* A wrapped key format attribute was missing. */ | |
543 | errSecStagedOperationInProgress = -67806, /* A staged operation is in progress. */ | |
544 | errSecStagedOperationNotStarted = -67807, /* A staged operation was not started. */ | |
545 | errSecVerifyFailed = -67808, /* A cryptographic verification failure has occurred. */ | |
546 | errSecQuerySizeUnknown = -67809, /* The query size is unknown. */ | |
547 | errSecBlockSizeMismatch = -67810, /* A block size mismatch occurred. */ | |
548 | errSecPublicKeyInconsistent = -67811, /* The public key was inconsistent. */ | |
549 | errSecDeviceVerifyFailed = -67812, /* A device verification failure has occurred. */ | |
550 | errSecInvalidLoginName = -67813, /* An invalid login name was detected. */ | |
551 | errSecAlreadyLoggedIn = -67814, /* The user is already logged in. */ | |
552 | errSecInvalidDigestAlgorithm = -67815, /* An invalid digest algorithm was detected. */ | |
553 | errSecInvalidCRLGroup = -67816, /* An invalid CRL group was detected. */ | |
554 | errSecCertificateCannotOperate = -67817, /* The certificate cannot operate. */ | |
555 | errSecCertificateExpired = -67818, /* An expired certificate was detected. */ | |
556 | errSecCertificateNotValidYet = -67819, /* The certificate is not yet valid. */ | |
557 | errSecCertificateRevoked = -67820, /* The certificate was revoked. */ | |
558 | errSecCertificateSuspended = -67821, /* The certificate was suspended. */ | |
559 | errSecInsufficientCredentials = -67822, /* Insufficient credentials were detected. */ | |
560 | errSecInvalidAction = -67823, /* The action was not valid. */ | |
561 | errSecInvalidAuthority = -67824, /* The authority was not valid. */ | |
562 | errSecVerifyActionFailed = -67825, /* A verify action has failed. */ | |
563 | errSecInvalidCertAuthority = -67826, /* The certificate authority was not valid. */ | |
564 | errSecInvaldCRLAuthority = -67827, /* The CRL authority was not valid. */ | |
565 | errSecInvalidCRLEncoding = -67828, /* The CRL encoding was not valid. */ | |
566 | errSecInvalidCRLType = -67829, /* The CRL type was not valid. */ | |
567 | errSecInvalidCRL = -67830, /* The CRL was not valid. */ | |
568 | errSecInvalidFormType = -67831, /* The form type was not valid. */ | |
569 | errSecInvalidID = -67832, /* The ID was not valid. */ | |
570 | errSecInvalidIdentifier = -67833, /* The identifier was not valid. */ | |
571 | errSecInvalidIndex = -67834, /* The index was not valid. */ | |
572 | errSecInvalidPolicyIdentifiers = -67835, /* The policy identifiers are not valid. */ | |
573 | errSecInvalidTimeString = -67836, /* The time specified was not valid. */ | |
574 | errSecInvalidReason = -67837, /* The trust policy reason was not valid. */ | |
575 | errSecInvalidRequestInputs = -67838, /* The request inputs are not valid. */ | |
576 | errSecInvalidResponseVector = -67839, /* The response vector was not valid. */ | |
577 | errSecInvalidStopOnPolicy = -67840, /* The stop-on policy was not valid. */ | |
578 | errSecInvalidTuple = -67841, /* The tuple was not valid. */ | |
579 | errSecMultipleValuesUnsupported = -67842, /* Multiple values are not supported. */ | |
580 | errSecNotTrusted = -67843, /* The trust policy was not trusted. */ | |
581 | errSecNoDefaultAuthority = -67844, /* No default authority was detected. */ | |
582 | errSecRejectedForm = -67845, /* The trust policy had a rejected form. */ | |
583 | errSecRequestLost = -67846, /* The request was lost. */ | |
584 | errSecRequestRejected = -67847, /* The request was rejected. */ | |
585 | errSecUnsupportedAddressType = -67848, /* The address type is not supported. */ | |
586 | errSecUnsupportedService = -67849, /* The service is not supported. */ | |
587 | errSecInvalidTupleGroup = -67850, /* The tuple group was not valid. */ | |
588 | errSecInvalidBaseACLs = -67851, /* The base ACLs are not valid. */ | |
589 | errSecInvalidTupleCredendtials = -67852, /* The tuple credentials are not valid. */ | |
590 | errSecInvalidEncoding = -67853, /* The encoding was not valid. */ | |
591 | errSecInvalidValidityPeriod = -67854, /* The validity period was not valid. */ | |
592 | errSecInvalidRequestor = -67855, /* The requestor was not valid. */ | |
593 | errSecRequestDescriptor = -67856, /* The request descriptor was not valid. */ | |
594 | errSecInvalidBundleInfo = -67857, /* The bundle information was not valid. */ | |
595 | errSecInvalidCRLIndex = -67858, /* The CRL index was not valid. */ | |
596 | errSecNoFieldValues = -67859, /* No field values were detected. */ | |
597 | errSecUnsupportedFieldFormat = -67860, /* The field format is not supported. */ | |
598 | errSecUnsupportedIndexInfo = -67861, /* The index information is not supported. */ | |
599 | errSecUnsupportedLocality = -67862, /* The locality is not supported. */ | |
600 | errSecUnsupportedNumAttributes = -67863, /* The number of attributes is not supported. */ | |
601 | errSecUnsupportedNumIndexes = -67864, /* The number of indexes is not supported. */ | |
602 | errSecUnsupportedNumRecordTypes = -67865, /* The number of record types is not supported. */ | |
603 | errSecFieldSpecifiedMultiple = -67866, /* Too many fields were specified. */ | |
604 | errSecIncompatibleFieldFormat = -67867, /* The field format was incompatible. */ | |
605 | errSecInvalidParsingModule = -67868, /* The parsing module was not valid. */ | |
606 | errSecDatabaseLocked = -67869, /* The database is locked. */ | |
607 | errSecDatastoreIsOpen = -67870, /* The data store is open. */ | |
608 | errSecMissingValue = -67871, /* A missing value was detected. */ | |
609 | errSecUnsupportedQueryLimits = -67872, /* The query limits are not supported. */ | |
610 | errSecUnsupportedNumSelectionPreds = -67873, /* The number of selection predicates is not supported. */ | |
611 | errSecUnsupportedOperator = -67874, /* The operator is not supported. */ | |
612 | errSecInvalidDBLocation = -67875, /* The database location is not valid. */ | |
613 | errSecInvalidAccessRequest = -67876, /* The access request is not valid. */ | |
614 | errSecInvalidIndexInfo = -67877, /* The index information is not valid. */ | |
615 | errSecInvalidNewOwner = -67878, /* The new owner is not valid. */ | |
616 | errSecInvalidModifyMode = -67879, /* The modify mode is not valid. */ | |
617 | errSecMissingRequiredExtension = -67880, /* A required certificate extension is missing. */ | |
618 | errSecExtendedKeyUsageNotCritical = -67881, /* The extended key usage extension was not marked critical. */ | |
619 | errSecTimestampMissing = -67882, /* A timestamp was expected but was not found. */ | |
620 | errSecTimestampInvalid = -67883, /* The timestamp was not valid. */ | |
621 | errSecTimestampNotTrusted = -67884, /* The timestamp was not trusted. */ | |
622 | errSecTimestampServiceNotAvailable = -67885, /* The timestamp service is not available. */ | |
623 | errSecTimestampBadAlg = -67886, /* An unrecognized or unsupported Algorithm Identifier in timestamp. */ | |
624 | errSecTimestampBadRequest = -67887, /* The timestamp transaction is not permitted or supported. */ | |
625 | errSecTimestampBadDataFormat = -67888, /* The timestamp data submitted has the wrong format. */ | |
626 | errSecTimestampTimeNotAvailable = -67889, /* The time source for the Timestamp Authority is not available. */ | |
627 | errSecTimestampUnacceptedPolicy = -67890, /* The requested policy is not supported by the Timestamp Authority. */ | |
628 | errSecTimestampUnacceptedExtension = -67891, /* The requested extension is not supported by the Timestamp Authority. */ | |
629 | errSecTimestampAddInfoNotAvailable = -67892, /* The additional information requested is not available. */ | |
630 | errSecTimestampSystemFailure = -67893, /* The timestamp request cannot be handled due to system failure . */ | |
631 | errSecSigningTimeMissing = -67894, /* A signing time was expected but was not found. */ | |
632 | errSecTimestampRejection = -67895, /* A timestamp transaction was rejected. */ | |
633 | errSecTimestampWaiting = -67896, /* A timestamp transaction is waiting. */ | |
634 | errSecTimestampRevocationWarning = -67897, /* A timestamp authority revocation warning was issued. */ | |
635 | errSecTimestampRevocationNotification = -67898, /* A timestamp authority revocation notification was issued. */ | |
636 | }; | |
637 | ||
638 | #if defined(__cplusplus) | |
639 | } | |
640 | #endif | |
641 | ||
642 | #endif /* !_SECURITY_SECBASE_H_ */ |