2 * Copyright (c) 2002-2004,2011,2014 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
25 @header SecCertificateBundle
26 The functions provided in SecCertificateBundle implement a way to issue a certificate request to a
27 certificate authority.
30 #ifndef _SECURITY_SECCERTIFICATEBUNDLE_H_
31 #define _SECURITY_SECCERTIFICATEBUNDLE_H_
33 #include <Security/SecBase.h>
34 #include <Security/cssmtype.h>
35 #include <CoreFoundation/CFArray.h>
37 #if defined(__cplusplus)
42 @function SecCertificateBundleImport
43 @abstract Imports one or more certificates into a keychain with the specified encoding and bundle type.
44 @param keychain The destination keychain for the import. Specify NULL for the default keychain.
45 @param bundle A pointer to the bundle data.
46 @param type The bundle type as defined in cssmtype.h.
47 @param encodingType The bundle encoding type as defined in cssmtype.h.
48 @param keychainListToSkipDuplicates A reference to an array of keychains. These keychains contain certificates that shouldn't be duplicated during the import.
49 @result A result code. See "Security Error Codes" (SecBase.h).
51 OSStatus
SecCertificateBundleImport(
52 SecKeychainRef keychain
,
53 const CSSM_CERT_BUNDLE
* bundle
,
54 CSSM_CERT_BUNDLE_TYPE type
,
55 CSSM_CERT_BUNDLE_ENCODING encodingType
,
56 CFArrayRef keychainListToSkipDuplicates
) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
59 @function SecCertificateBundleExport
60 @abstract Exports one or more certificates into a bundle with the specified encoding and bundle type.
61 @param certificates An array of certificate and keychain items used to help build the bundle.
62 @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.
63 @param encodingType The encoding type as defined in cssmtype.h.
64 @param data A pointer to data. On return, this points to the bundle data.
65 @result A result code. See "Security Error Codes" (SecBase.h).
67 OSStatus
SecCertificateBundleExport(
68 CFArrayRef certificates
,
69 CSSM_CERT_BUNDLE_TYPE type
,
70 CSSM_CERT_BUNDLE_ENCODING encodingType
,
71 CSSM_DATA
* data
) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
73 /* misspelled version of above */
74 OSStatus
SecCertifcateBundleExport(
76 CSSM_CERT_BUNDLE_TYPE type
,
77 CSSM_CERT_BUNDLE_ENCODING encodingType
,
78 CSSM_DATA
* data
) DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER
;
80 #if defined(__cplusplus)
84 #endif /* !_SECURITY_SECCERTIFICATEBUNDLE_H_ */