]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_keychain/lib/SecBaseP.h
Security-57337.50.23.tar.gz
[apple/security.git] / OSX / libsecurity_keychain / lib / SecBaseP.h
1 /*
2 * Copyright (c) 2000-2009,2011 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 SecBase
26 SecBase contains common declarations for the Security functions.
27 */
28
29 #ifndef _SECURITY_SECBASEP_H_
30 #define _SECURITY_SECBASEP_H_
31
32 #include <Availability.h>
33
34 #if defined(__cplusplus)
35 extern "C" {
36 #endif
37
38 /*!
39 @typedef SecCertificateRef
40 @abstract CFType representing a X.509 certificate, see
41 SecCertificate.h for details.
42 */
43 typedef struct __SecCertificate *SecCertificateRefP;
44
45 /*!
46 @typedef SecIdentityRef
47 @abstract CFType representing an identity, which contains
48 a SecKeyRef and an ascociated SecCertificateRef, see
49 SecIdentity.h for details.
50 */
51 typedef struct __SecIdentity *SecIdentityRefP;
52
53 /*!
54 @typedef SecKeyRef
55 @abstract CFType representing an asymetric key, see
56 SecKey.h for details.
57 */
58 typedef struct __SecKey *SecKeyRefP;
59
60 /***********************************************
61 *** OSStatus values unique to Security APIs ***
62 ***********************************************/
63
64 /*
65 Note: the comments that appear after these errors are used to create
66 SecErrorMessages.strings. The comments must not be multi-line, and
67 should be in a form meaningful to an end user. If a different or
68 additional comment is needed, it can be put in the header doc format,
69 or on a line that does not start with errZZZ.
70 */
71
72 #if 0
73 enum
74 {
75 errSecSuccess = 0, /* No error. */
76 errSecUnimplemented = -4, /* Function or operation not implemented. */
77 errSecParam = -50, /* One or more parameters passed to a function where not valid. */
78 errSecAllocate = -108, /* Failed to allocate memory. */
79 errSecNotAvailable = -25291, /* No keychain is available. You may need to restart your computer. */
80 errSecDuplicateItem = -25299, /* The specified item already exists in the keychain. */
81 errSecItemNotFound = -25300, /* The specified item could not be found in the keychain. */
82 errSecInteractionNotAllowed = -25308, /* User interaction is not allowed. */
83 errSecDecode = -26275, /* Unable to decode the provided data. */
84 };
85 #endif
86
87 #if defined(__cplusplus)
88 }
89 #endif
90
91 #endif /* !_SECURITY_SECBASEP_H_ */