]> git.saurik.com Git - apple/security.git/blob - Keychain/SecCertificateBundle.h
Security-179.tar.gz
[apple/security.git] / Keychain / SecCertificateBundle.h
1 /*
2 * Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18 /*!
19 @header SecCertificateBundle
20 The functions provided in SecCertificateBundle implement a way to issue a certificate request to a
21 certificate authority.
22 */
23
24 #ifndef _SECURITY_SECCERTIFICATEBUNDLE_H_
25 #define _SECURITY_SECCERTIFICATEBUNDLE_H_
26
27 #include <Security/SecBase.h>
28 #include <Security/cssmtype.h>
29 #include <CoreFoundation/CFArray.h>
30
31 #if defined(__cplusplus)
32 extern "C" {
33 #endif
34
35 /*!
36 @function SecCertificateBundleImport
37 @abstract Imports one or more certificates into a keychain with the specified encoding and bundle type.
38 @param keychain The destination keychain for the import. Specify NULL for the default keychain.
39 @param bundle A pointer to the bundle data.
40 @param type The bundle type as defined in cssmtype.h.
41 @param encodingType The bundle encoding type as defined in cssmtype.h.
42 @param keychainListToSkipDuplicates A reference to an array of keychains. These keychains contain certificates that shouldn't be duplicated during the import.
43 @result A result code. See "Security Error Codes" (SecBase.h).
44 */
45 OSStatus SecCertificateBundleImport(
46 SecKeychainRef keychain,
47 const CSSM_CERT_BUNDLE* bundle,
48 CSSM_CERT_BUNDLE_TYPE type,
49 CSSM_CERT_BUNDLE_ENCODING encodingType,
50 CFArrayRef keychainListToSkipDuplicates);
51
52 /*!
53 @function SecCertifcateBundleExport
54 @abstract Exports one or more certificates into a bundle with the specified encoding and bundle type.
55 @param certificates An array of certificate and keychain items used to help build the bundle.
56 @param type The bundle type as defined in cssmtype.h. If the bundle type is unknown, an attempt will be made to determine the type for you.
57 @param encodingType The encoding type as defined in cssmtype.h.
58 @param data A pointer to data. On return, this points to the bundle data.
59 @result A result code. See "Security Error Codes" (SecBase.h).
60 */
61 OSStatus SecCertifcateBundleExport(
62 CFArrayRef certificates,
63 CSSM_CERT_BUNDLE_TYPE type,
64 CSSM_CERT_BUNDLE_ENCODING encodingType,
65 CSSM_DATA* data);
66
67 #if defined(__cplusplus)
68 }
69 #endif
70
71 #endif /* !_SECURITY_SECCERTIFICATEBUNDLE_H_ */