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