2 * Copyright (c) 2003-2017 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@
26 The functions provided in SecPolicyPriv provide an interface to various
27 X.509 certificate trust policies.
30 #ifndef _SECURITY_SECPOLICYPRIV_H_
31 #define _SECURITY_SECPOLICYPRIV_H_
33 #include <Security/SecBase.h>
34 #include <Security/SecPolicy.h>
35 #include <Security/SecCertificate.h>
36 #include <CoreFoundation/CFArray.h>
37 #include <CoreFoundation/CFString.h>
38 #include <Availability.h>
43 CF_ASSUME_NONNULL_BEGIN
44 CF_IMPLICIT_BRIDGING_ENABLED
47 @enum Policy Constants (Private)
48 @discussion Predefined constants used to specify a policy.
50 extern const CFStringRef kSecPolicyAppleMobileStore
51 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
52 extern const CFStringRef kSecPolicyAppleTestMobileStore
53 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
54 extern const CFStringRef kSecPolicyAppleEscrowService
55 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
56 extern const CFStringRef kSecPolicyAppleProfileSigner
57 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
58 extern const CFStringRef kSecPolicyAppleQAProfileSigner
59 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
60 extern const CFStringRef kSecPolicyAppleServerAuthentication
61 __OSX_AVAILABLE_STARTING(__MAC_10_10
, __IPHONE_8_0
);
62 extern const CFStringRef kSecPolicyAppleIDValidationRecordSigning
63 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
64 extern const CFStringRef kSecPolicyAppleSMPEncryption
65 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_8_0
);
66 extern const CFStringRef kSecPolicyAppleTestSMPEncryption
67 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_8_0
);
68 extern const CFStringRef kSecPolicyApplePCSEscrowService
69 __OSX_AVAILABLE_STARTING(__MAC_10_10
, __IPHONE_7_0
);
70 extern const CFStringRef kSecPolicyApplePPQSigning
71 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
72 extern const CFStringRef kSecPolicyAppleTestPPQSigning
73 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
74 extern const CFStringRef kSecPolicyAppleSWUpdateSigning
75 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
76 extern const CFStringRef kSecPolicyApplePackageSigning
77 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
78 extern const CFStringRef kSecPolicyAppleOSXProvisioningProfileSigning
79 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
80 extern const CFStringRef kSecPolicyAppleATVVPNProfileSigning
81 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
82 extern const CFStringRef kSecPolicyAppleAST2DiagnosticsServerAuth
83 __OSX_AVAILABLE_STARTING(__MAC_10_11_4
, __IPHONE_9_3
);
84 extern const CFStringRef kSecPolicyAppleEscrowProxyServerAuth
85 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
86 extern const CFStringRef kSecPolicyAppleFMiPServerAuth
87 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
88 extern const CFStringRef kSecPolicyAppleMMCService
89 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
90 extern const CFStringRef kSecPolicyAppleGSService
91 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
92 extern const CFStringRef kSecPolicyApplePPQService
93 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
94 extern const CFStringRef kSecPolicyAppleHomeKitServerAuth
95 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
96 extern const CFStringRef kSecPolicyAppleiPhoneActivation
97 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
98 extern const CFStringRef kSecPolicyAppleiPhoneDeviceCertificate
99 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
100 extern const CFStringRef kSecPolicyAppleFactoryDeviceCertificate
101 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
102 extern const CFStringRef kSecPolicyAppleiAP
103 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
104 extern const CFStringRef kSecPolicyAppleiTunesStoreURLBag
105 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
106 extern const CFStringRef kSecPolicyAppleiPhoneApplicationSigning
107 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
108 extern const CFStringRef kSecPolicyAppleiPhoneProfileApplicationSigning
109 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
110 extern const CFStringRef kSecPolicyAppleiPhoneProvisioningProfileSigning
111 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
112 extern const CFStringRef kSecPolicyAppleLockdownPairing
113 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
114 extern const CFStringRef kSecPolicyAppleURLBag
115 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
116 extern const CFStringRef kSecPolicyAppleOTATasking
117 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
118 extern const CFStringRef kSecPolicyAppleMobileAsset
119 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
120 extern const CFStringRef kSecPolicyAppleIDAuthority
121 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
122 extern const CFStringRef kSecPolicyAppleGenericApplePinned
123 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
124 extern const CFStringRef kSecPolicyAppleGenericAppleSSLPinned
125 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
126 extern const CFStringRef kSecPolicyAppleSoftwareSigning
127 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
128 extern const CFStringRef kSecPolicyAppleExternalDeveloper
129 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
130 extern const CFStringRef kSecPolicyAppleOCSPSigner
131 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
132 extern const CFStringRef kSecPolicyAppleIDSService
133 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
134 extern const CFStringRef kSecPolicyAppleIDSServiceContext
135 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
136 extern const CFStringRef kSecPolicyApplePushService
137 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
138 extern const CFStringRef kSecPolicyAppleLegacyPushService
139 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
140 extern const CFStringRef kSecPolicyAppleTVOSApplicationSigning
141 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
142 extern const CFStringRef kSecPolicyAppleUniqueDeviceIdentifierCertificate
143 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
144 extern const CFStringRef kSecPolicyAppleEscrowProxyCompatibilityServerAuth
145 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
146 extern const CFStringRef kSecPolicyAppleMMCSCompatibilityServerAuth
147 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
148 extern const CFStringRef kSecPolicyAppleSecureIOStaticAsset
149 __OSX_AVAILABLE(10.12.1) __IOS_AVAILABLE(10.1) __TVOS_AVAILABLE(10.0.1) __WATCHOS_AVAILABLE(3.1);
150 extern const CFStringRef kSecPolicyAppleWarsaw
151 __OSX_AVAILABLE(10.12.1) __IOS_AVAILABLE(10.1) __TVOS_AVAILABLE(10.0.1) __WATCHOS_AVAILABLE(3.1);
152 extern const CFStringRef kSecPolicyAppleiCloudSetupServerAuth
153 __OSX_AVAILABLE(10.12.4) __IOS_AVAILABLE(10.3) __TVOS_AVAILABLE(10.2) __WATCHOS_AVAILABLE(3.2);
154 extern const CFStringRef kSecPolicyAppleiCloudSetupCompatibilityServerAuth
155 __OSX_AVAILABLE(10.12.4) __IOS_AVAILABLE(10.3) __TVOS_AVAILABLE(10.2) __WATCHOS_AVAILABLE(3.2);
156 extern const CFStringRef kSecPolicyAppleAppTransportSecurity
157 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
158 extern const CFStringRef kSecPolicyAppleMobileSoftwareUpdate
159 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
160 extern const CFStringRef kSecPolicyAppleMobileAssetDevelopment
161 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
162 extern const CFStringRef kSecPolicyAppleMacOSProfileApplicationSigning
163 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
164 extern const CFStringRef kSecPolicyAppleBasicAttestationSystem
165 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
166 extern const CFStringRef kSecPolicyAppleBasicAttestationUser
167 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
168 extern const CFStringRef kSecPolicyAppleiPhoneVPNApplicationSigning
169 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
170 extern const CFStringRef kSecPolicyAppleiAPSWAuth
171 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
172 extern const CFStringRef kSecPolicyAppleDemoDigitalCatalog
173 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
174 extern const CFStringRef kSecPolicyAppleAssetReceipt
175 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
176 extern const CFStringRef kSecPolicyAppleDeveloperIDPlusTicket
177 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
178 extern const CFStringRef kSecPolicyAppleComponentCertificate
179 API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
180 extern const CFStringRef kSecPolicyAppleKeyTransparency
181 API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
182 extern const CFStringRef kSecPolicyAppleLegacySSL
183 API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
184 extern const CFStringRef kSecPolicyAppleAlisha
185 API_AVAILABLE(macos(10.15.4), ios(13.4), watchos(6.2), tvos(13.4));
186 extern const CFStringRef kSecPolicyAppleMeasuredBootPolicySigning
187 API_AVAILABLE(macos(10.15.4), ios(13.4), watchos(6.2), tvos(13.4));
188 extern const CFStringRef kSecPolicyApplePayQRCodeEncryption
189 API_AVAILABLE(macos(10.16), ios(14.0), watchos(7.0), tvos(14.0));
190 extern const CFStringRef kSecPolicyApplePayQRCodeSigning
191 API_AVAILABLE(macos(10.16), ios(14.0), watchos(7.0), tvos(14.0));
192 extern const CFStringRef kSecPolicyAppleAccessoryUpdateSigning
193 API_AVAILABLE(macos(10.16), ios(14.0), watchos(7.0), tvos(14.0));
194 extern const CFStringRef kSecPolicyAppleEscrowServiceIdKeySigning
195 API_AVAILABLE(macos(10.15.6), ios(13.5.5));
196 extern const CFStringRef kSecPolicyApplePCSEscrowServiceIdKeySigning
197 API_AVAILABLE(macos(10.15.6), ios(13.5.5));
198 extern const CFStringRef kSecPolicyAppleAggregateMetricTransparency
199 API_AVAILABLE(macos(10.15.6), ios(13.6), watchos(6.2), tvos(13.4));
200 extern const CFStringRef kSecPolicyAppleAggregateMetricEncryption
201 API_AVAILABLE(macos(11.1), ios(14.3), watchos(7.2), tvos(14.3));
205 @enum Policy Name Constants (Private)
206 @discussion Predefined constants used to specify a SSL Pinning policy.
207 To be used with SecTrustSetPolicyName.
208 @constant kSecPolicyNameAppleAST2Service
209 @constant kSecPolicyNameAppleEscrowProxyService
210 @constant kSecPolicyNameAppleFMiPService
211 @constant kSecPolicyNameAppleGSService
212 @constant kSecPolicyNameAppleHomeKitService
213 @constant kSecPolicyNameAppleiCloudSetupService
214 @constant kSecPolicyNameAppleIDSService
215 @constant kSecPolicyNameAppleMMCSService
216 @constant kSecPolicyNameApplePPQService
217 @constant kSecPolicyNameApplePushService
218 @constant kSecPolicyNameAppleAIDCService
219 @constant kSecPolicyNameAppleMapsService
220 @constant kSecPolicyNameAppleHealthProviderService
221 @constant kSecPolicyNameAppleParsecService
222 @constant kSecPolicyNameAppleAMPService
223 @constant kSecPolicyNameAppleSiriService
224 @constant kSecPolicyNameAppleHomeAppClipUploadService
225 @constant kSecPolicyNameAppleUpdatesService
226 @constant kSecPolicyNameApplePushCertPortal
228 extern const CFStringRef kSecPolicyNameAppleAST2Service
229 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
230 extern const CFStringRef kSecPolicyNameAppleEscrowProxyService
231 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
232 extern const CFStringRef kSecPolicyNameAppleFMiPService
233 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
234 extern const CFStringRef kSecPolicyNameAppleGSService
235 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
236 extern const CFStringRef kSecPolicyNameAppleHomeKitService
237 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
238 extern const CFStringRef kSecPolicyNameAppleiCloudSetupService
239 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
240 extern const CFStringRef kSecPolicyNameAppleIDSService
241 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
242 extern const CFStringRef kSecPolicyNameAppleMMCSService
243 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
244 extern const CFStringRef kSecPolicyNameApplePPQService
245 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
246 extern const CFStringRef kSecPolicyNameApplePushService
247 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
248 extern const CFStringRef kSecPolicyNameAppleAIDCService
249 __OSX_AVAILABLE(10.13.4) __IOS_AVAILABLE(11.3) __TVOS_AVAILABLE(11.3) __WATCHOS_AVAILABLE(4.3);
250 extern const CFStringRef kSecPolicyNameAppleMapsService
251 __OSX_AVAILABLE(10.13.4) __IOS_AVAILABLE(11.3) __TVOS_AVAILABLE(11.3) __WATCHOS_AVAILABLE(4.3);
252 extern const CFStringRef kSecPolicyNameAppleHealthProviderService
253 __OSX_AVAILABLE(10.13.4) __IOS_AVAILABLE(11.3) __TVOS_AVAILABLE(11.3) __WATCHOS_AVAILABLE(4.3);
254 extern const CFStringRef kSecPolicyNameAppleParsecService
255 __OSX_AVAILABLE(10.13.4) __IOS_AVAILABLE(11.3) __TVOS_AVAILABLE(11.3) __WATCHOS_AVAILABLE(4.3);
256 extern const CFStringRef kSecPolicyNameAppleAMPService
257 API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
258 extern const CFStringRef kSecPolicyNameAppleSiriService
259 API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
260 extern const CFStringRef kSecPolicyNameAppleHomeAppClipUploadService
261 API_AVAILABLE(macos(10.15.1), ios(13.2), watchos(6.1), tvos(13.1));
262 extern const CFStringRef kSecPolicyNameAppleUpdatesService
263 API_AVAILABLE(macos(10.15.4), ios(13.4), watchos(6.2), tvos(13.4));
264 extern const CFStringRef kSecPolicyNameApplePushCertPortal
265 API_AVAILABLE(macos(10.16), ios(14.0), watchos(7.0), tvos(14.0));
268 @enum Policy Value Constants
269 @abstract Predefined property key constants used to get or set values in
270 a dictionary for a policy instance.
272 All policies will have the following read-only value:
273 kSecPolicyOid (the policy object identifier)
275 Additional policy values which your code can optionally set:
276 kSecPolicyName (name which must be matched)
277 kSecPolicyClient (evaluate for client, rather than server)
278 kSecPolicyRevocationFlags (only valid for a revocation policy)
279 kSecPolicyRevocationFlags (only valid for a revocation policy)
280 kSecPolicyTeamIdentifier (only valid for a Passbook signing policy)
281 kSecPolicyContext (valid for policies below that take a context parameter)
282 kSecPolicyPolicyName (only valid for GenericApplePinned or
283 GenericAppleSSLPinned policies)
284 kSecPolicyIntermediateMarkerOid (only valid for GenericApplePinned or
285 GenericAppleSSLPinned policies)
286 kSecPolicyLeafMarkerOid (only valid for GenericApplePinned or
287 GenericAppleSSLPinned policies)
288 kSecPolicyRootDigest (only valid for the UniqueDeviceCertificate policy)
290 @constant kSecPolicyContext Specifies a CFDictionaryRef with keys and values
291 specified by the particular SecPolicyCreate function.
292 @constant kSecPolicyPolicyName Specifies a CFStringRef of the name of the
293 desired policy result.
294 @constant kSecPolicyIntermediateMarkerOid Specifies a CFStringRef of the
295 marker OID (in decimal format) required in the intermediate certificate.
296 @constant kSecPolicyLeafMarkerOid Specifies a CFStringRef of the
297 marker OID (in decimal format) required in the leaf certificate.
298 @constant kSecPolicyRootDigest Specifies a CFDataRef of digest required to
299 match the SHA-256 of the root certificate.
301 extern const CFStringRef kSecPolicyContext
302 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
303 extern const CFStringRef kSecPolicyPolicyName
304 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
305 extern const CFStringRef kSecPolicyIntermediateMarkerOid
306 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
307 extern const CFStringRef kSecPolicyLeafMarkerOid
308 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
309 extern const CFStringRef kSecPolicyRootDigest
310 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
313 @enum Revocation Policy Constants
314 @abstract Predefined constants which allow you to specify how revocation
315 checking will be performed for a trust evaluation.
316 @constant kSecRevocationOnlineCheck If this flag is set, perform an online
317 revocation check, ignoring cached revocation results. This flag will not force
318 an online check if an online check was done within the last 5 minutes. Online
319 checks are only applicable to OCSP; this constant will not force a fresh
321 @constant kSecRevocationCheckIfTrusted If this flag is set, perform network-based
322 revocation checks only if the chain has no other validation errors. This flag
323 overrides SecTrustSetNetworkFetchAllowed and kSecRevocationNetworkAccessDisabled
324 for revocation checking (but not for intermediate fetching).
325 Note that this flag's behavior is not default because revoked certs produce Fatal
326 trust results, whereas most checks produce Recoverable trust results. If we skip
327 revocation checks on untrusted chains, the user may be able to ignore the failures
330 CF_ENUM(CFOptionFlags
) {
331 kSecRevocationOnlineCheck
= (1 << 5),
332 kSecRevocationCheckIfTrusted
= (1 << 6),
336 @function SecPolicyCreateApplePinned
337 @abstract Returns a policy object for verifying Apple certificates.
338 @param policyName A string that identifies the policy name.
339 @param intermediateMarkerOID A string containing the decimal representation of the
340 extension OID in the intermediate certificate.
341 @param leafMarkerOID A string containing the decimal representation of the extension OID
342 in the leaf certificate.
343 @discussion The resulting policy uses the Basic X.509 policy with validity check and
345 * The chain is anchored to any of the Apple Root CAs.
346 * There are exactly 3 certs in the chain.
347 * The intermediate has a marker extension with OID matching the intermediateMarkerOID
349 * The leaf has a marker extension with OID matching the leafMarkerOID parameter.
350 * Revocation is checked via any available method.
351 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
352 @result A policy object. The caller is responsible for calling CFRelease on this when
353 it is no longer needed.
355 __nullable CF_RETURNS_RETAINED
356 SecPolicyRef
SecPolicyCreateApplePinned(CFStringRef policyName
,
357 CFStringRef intermediateMarkerOID
, CFStringRef leafMarkerOID
)
358 __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
361 @function SecPolicyCreateAppleSSLPinned
362 @abstract Returns a policy object for verifying Apple SSL certificates.
363 @param policyName A string that identifies the service/policy name.
364 @param hostname hostname to verify the certificate name against.
365 @param intermediateMarkerOID A string containing the decimal representation of the
366 extension OID in the intermediate certificate. If NULL is passed, the default OID of
367 1.2.840.113635.100.6.2.12 is checked.
368 @param leafMarkerOID A string containing the decimal representation of the extension OID
369 in the leaf certificate.
370 @discussion The resulting policy uses the Basic X.509 policy with validity check and
372 * The chain is anchored to any of the Apple Root CAs.
373 * There are exactly 3 certs in the chain.
374 * The intermediate has a marker extension with OID matching the intermediateMarkerOID
375 parameter, or 1.2.840.113635.100.6.2.12 if NULL is passed.
376 * The leaf has a marker extension with OID matching the leafMarkerOID parameter.
377 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
378 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
379 * Revocation is checked via any available method.
380 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
381 @result A policy object. The caller is responsible for calling CFRelease on this when
382 it is no longer needed.
384 __nullable CF_RETURNS_RETAINED
385 SecPolicyRef
SecPolicyCreateAppleSSLPinned(CFStringRef policyName
, CFStringRef hostname
,
386 CFStringRef __nullable intermediateMarkerOID
, CFStringRef leafMarkerOID
)
387 __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
390 @function SecPolicyCreateiPhoneActivation
391 @abstract Returns a policy object for verifying iPhone Activation
393 @discussion This policy uses the Basic X.509 policy with no validity check
395 * The chain is anchored to any of the Apple Root CAs.
396 * There are exactly 3 certs in chain.
397 * The intermediate has Common Name "Apple iPhone Certification Authority".
398 * The leaf has Common Name "iPhone Activation".
399 @result A policy object. The caller is responsible for calling CFRelease
400 on this when it is no longer needed.
402 __nullable CF_RETURNS_RETAINED
403 SecPolicyRef
SecPolicyCreateiPhoneActivation(void);
406 @function SecPolicyCreateiPhoneDeviceCertificate
407 @abstract Returns a policy object for verifying iPhone Device certificate
409 @discussion This policy uses the Basic X.509 policy with no validity check
411 * The chain is anchored to any of the Apple Root CAs
412 * There are exactly 4 certs in chain.
413 * The first intermediate has Common Name "Apple iPhone Device CA".
414 @result A policy object. The caller is responsible for calling CFRelease
415 on this when it is no longer needed.
417 __nullable CF_RETURNS_RETAINED
418 SecPolicyRef
SecPolicyCreateiPhoneDeviceCertificate(void);
421 @function SecPolicyCreateFactoryDeviceCertificate
422 @abstract Returns a policy object for verifying Factory Device certificate
424 @discussion This policy uses the Basic X.509 policy with no validity check
426 * The chain is anchored to the Factory Device CA.
427 @result A policy object. The caller is responsible for calling CFRelease
428 on this when it is no longer needed.
430 __nullable CF_RETURNS_RETAINED
431 SecPolicyRef
SecPolicyCreateFactoryDeviceCertificate(void);
434 @function SecPolicyCreateiAP
435 @abstract Returns a policy object for verifying iAP certificate chains.
436 @discussion This policy uses the Basic X.509 policy with no validity check
438 * The leaf has notBefore date after 5/31/2006 midnight GMT.
439 * The leaf has Common Name beginning with "IPA_".
440 The intended use of this policy is that the caller pass in the
441 intermediates for iAP1 and iAP2 to SecTrustSetAnchorCertificates().
442 @result A policy object. The caller is responsible for calling CFRelease
443 on this when it is no longer needed.
445 __nullable CF_RETURNS_RETAINED
446 SecPolicyRef
SecPolicyCreateiAP(void);
449 @function SecPolicyCreateiTunesStoreURLBag
450 @abstract Returns a policy object for verifying iTunes Store URL bag
452 @discussion This policy uses the Basic X.509 policy with no validity check
454 * The chain is anchored to the iTMS CA.
455 * There are exactly 2 certs in the chain.
456 * The leaf has Organization "Apple Inc.".
457 * The leaf has Common Name "iTunes Store URL Bag".
458 @result A policy object. The caller is responsible for calling CFRelease
459 on this when it is no longer needed.
461 __nullable CF_RETURNS_RETAINED
462 SecPolicyRef
SecPolicyCreateiTunesStoreURLBag(void);
465 @function SecPolicyCreateEAP
466 @abstract Returns a policy object for verifying for 802.1x/EAP certificates.
467 @param server Passing true for this parameter create a policy for EAP
469 @param trustedServerNames Optional; if present, the hostname in the leaf
470 certificate must be in the trustedServerNames list. Note that contrary
471 to all other policies the trustedServerNames list entries can have wildcards
472 whilst the certificate cannot. This matches the existing deployments.
473 @discussion This policy uses the Basic X.509 policy with validity check but
474 disallowing network fetching. If trustedServerNames param is non-null, the
475 ExtendedKeyUsage extension, if present, of the leaf certificate is verified
476 to contain either the ServerAuth OID, if the server param is true or
477 ClientAuth OID, otherwise.
478 @result A policy object. The caller is responsible for calling CFRelease
479 on this when it is no longer needed.
481 __nullable CF_RETURNS_RETAINED
482 SecPolicyRef
SecPolicyCreateEAP(Boolean server
, CFArrayRef __nullable trustedServerNames
);
485 @function SecPolicyCreateIPSec
486 @abstract Returns a policy object for evaluating IPSec certificate chains.
487 @param server Passing true for this parameter create a policy for IPSec
489 @param hostname Optional; if present, the policy will require the specified
490 hostname or ip address to match the hostname in the leaf certificate.
491 @discussion This policy uses the Basic X.509 policy with validity check.
492 @result A policy object. The caller is responsible for calling CFRelease
493 on this when it is no longer needed.
495 __nullable CF_RETURNS_RETAINED
496 SecPolicyRef
SecPolicyCreateIPSec(Boolean server
, CFStringRef __nullable hostname
);
499 @function SecPolicyCreateAppleSWUpdateSigning
500 @abstract Returns a policy object for evaluating SW update signing certs.
501 @discussion This policy uses the Basic X.509 policy with no validity check
503 * The chain is anchored to any of the Apple Root CAs.
504 * There are exactly 3 certs in the chain.
505 * The intermediate ExtendedKeyUsage Extension contains 1.2.840.113635.100.4.1.
506 * The leaf ExtendedKeyUsage extension contains 1.2.840.113635.100.4.1.
507 @result A policy object. The caller is responsible for calling CFRelease
508 on this when it is no longer needed.
510 __nullable CF_RETURNS_RETAINED
511 SecPolicyRef
SecPolicyCreateAppleSWUpdateSigning(void);
514 @function SecPolicyCreateApplePackageSigning
515 @abstract Returns a policy object for evaluating installer package signing certs.
516 @discussion This policy uses the Basic X.509 policy with no validity check
518 * The chain is anchored to any of the Apple Root CAs.
519 * There are exactly 3 certs in the chain.
520 * The leaf KeyUsage extension has the digital signature bit set.
521 * The leaf ExtendedKeyUsage extension has the CodeSigning OID.
522 @result A policy object. The caller is responsible for calling CFRelease
523 on this when it is no longer needed.
525 __nullable CF_RETURNS_RETAINED
526 SecPolicyRef
SecPolicyCreateApplePackageSigning(void);
529 @function SecPolicyCreateiPhoneApplicationSigning
530 @abstract Returns a policy object for evaluating signed application
531 signatures. This is for apps signed directly by the app store.
532 @discussion This policy uses the Basic X.509 policy with no validity check
534 * The chain is anchored to any of the Apple Root CAs.
535 * There are exactly 3 certs in the chain.
536 * The intermediate has Common Name "Apple iPhone Certification Authority".
537 * The leaf has Common Name "Apple iPhone OS Application Signing".
538 * The leaf has a marker extension with OID 1.2.840.113635.100.6.1.3 or OID
539 1.2.840.113635.100.6.1.6.
540 * The leaf has ExtendedKeyUsage, if any, with the AnyExtendedKeyUsage OID
541 or the CodeSigning OID.
542 @result A policy object. The caller is responsible for calling CFRelease
543 on this when it is no longer needed.
545 __nullable CF_RETURNS_RETAINED
546 SecPolicyRef
SecPolicyCreateiPhoneApplicationSigning(void);
549 @function SecPolicyCreateiPhoneVPNApplicationSigning
550 @abstract Returns a policy object for evaluating signed VPN application
551 signatures. This is for VPN plugins signed directly by the VPN team.
552 @discussion This policy uses the Basic X.509 policy with no validity check
554 * The chain is anchored to any of the Apple Root CAs.
555 * There are exactly 3 certs in the chain.
556 * The intermediate has Common Name "Apple iPhone Certification Authority".
557 * The leaf has Common Name "Apple iPhone OS Application Signing".
558 * The leaf has a marker extension with 1.2.840.113635.100.6.1.6.
559 * The leaf has ExtendedKeyUsage, if any, with the AnyExtendedKeyUsage OID
560 or the CodeSigning OID.
561 @result A policy object. The caller is responsible for calling CFRelease
562 on this when it is no longer needed.
564 __nullable CF_RETURNS_RETAINED
565 SecPolicyRef
SecPolicyCreateiPhoneVPNApplicationSigning(void)
566 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
569 @function SecPolicyCreateiPhoneProfileApplicationSigning
570 @abstract Returns a policy object for evaluating signed application
571 signatures. This policy is for certificates inside a UPP or regular
573 @discussion This policy uses the Basic X.509 policy with validity check and
575 * The chain is anchored to any of the Apple Root CAs.
576 * There are exactly 3 certs in the chain.
577 * The intermediate has a marker extension with OID matching 1.2.840.113635.100.6.2.1 (WWDR CA).
578 * The leaf has a marker extension with OID matching one of the following:
579 * 1.2.840.113635.100.6.1.2 ("iPhone Developer" leaf)
580 * 1.2.840.113635.100.6.1.4 ("iPhone Distribution" leaf)
581 * 1.2.840.113635.100.6.1.25.1 ("TestFlight" leaf)
582 * On internal releases, 1.2.840.113635.100.6.1.25.2
583 * The leaf has an ExtendedKeyUsage OID matching 1.3.6.1.5.5.7.3.3 (CodeSigning EKU).
584 * Revocation is checked via any available method.
585 @result A policy object. The caller is responsible for calling CFRelease
586 on this when it is no longer needed.
588 __nullable CF_RETURNS_RETAINED
589 SecPolicyRef
SecPolicyCreateiPhoneProfileApplicationSigning(void);
592 @function SecPolicyCreateMacOSProfileApplicationSigning
593 @abstract Returns a policy object for evaluating signed application
594 signatures. This policy is for certificates inside a UPP or regular
596 @discussion This policy uses the Basic X.509 policy with no validity check
598 * The chain is anchored to any of the Apple Root CAs.
599 * There are exactly 3 certs in the chain.
600 * The leaf has a marker extension with OID matching one of the following:
601 * 1.2.840.113635.100.6.1.7 ("3rd Party Mac Developer Application" leaf)
602 * 1.2.840.113635.100.6.1.12 ("Mac Developer" leaf)
603 * 1.2.840.113635.100.6.1.13 ("Developer ID Application" leaf)
604 * 1.2.840.113635.100.6.22 ("Software Signing" leaf
605 * The leaf has an ExtendedKeyUsage OID matching 1.3.6.1.5.5.7.3.3 (CodeSigning EKU).
606 * Revocation is checked via any available method.
607 @result A policy object. The caller is responsible for calling CFRelease
608 on this when it is no longer needed.
610 __nullable CF_RETURNS_RETAINED
611 SecPolicyRef
SecPolicyCreateMacOSProfileApplicationSigning(void)
612 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
615 @function SecPolicyCreateiPhoneProvisioningProfileSigning
616 @abstract Returns a policy object for evaluating provisioning profile signatures.
617 @discussion This policy uses the Basic X.509 policy with no validity check
619 * The chain is anchored to any of the Apple Root CAs.
620 * There are exactly 3 certs in the chain.
621 * The intermediate has Common Name "Apple iPhone Certification Authority".
622 * The leaf has Common Name "Apple iPhone OS Provisioning Profile Signing".
623 * If the device is not a production device and is running an internal
624 release, the leaf may have the Common Name "TEST Apple iPhone OS
625 Provisioning Profile Signing TEST".
626 @result A policy object. The caller is responsible for calling CFRelease
627 on this when it is no longer needed.
629 __nullable CF_RETURNS_RETAINED
630 SecPolicyRef
SecPolicyCreateiPhoneProvisioningProfileSigning(void);
633 @function SecPolicyCreateAppleTVOSApplicationSigning
634 @abstract Returns a policy object for evaluating signed application
635 signatures. This is for apps signed directly by the Apple TV app store,
636 and allows for both the prod and the dev/test certs.
637 @discussion This policy uses the Basic X.509 policy with no validity check
639 * The chain is anchored to any of the Apple Root CAs.
640 Test roots are never permitted.
641 * There are exactly 3 certs in the chain.
642 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.1.
643 * The leaf has ExtendedKeyUsage, if any, with the AnyExtendedKeyUsage OID or
645 * The leaf has a marker extension with OID 1.2.840.113635.100.6.1.24 or OID
646 1.2.840.113635.100.6.1.24.1.
647 @result A policy object. The caller is responsible for calling CFRelease
648 on this when it is no longer needed.
650 __nullable CF_RETURNS_RETAINED
651 SecPolicyRef
SecPolicyCreateAppleTVOSApplicationSigning(void);
654 @function SecPolicyCreateOCSPSigner
655 @abstract Returns a policy object for evaluating ocsp response signers.
656 @discussion This policy uses the Basic X.509 policy with validity check and
657 requires the leaf to have an ExtendedKeyUsage of OCSPSigning.
658 @result A policy object. The caller is responsible for calling CFRelease
659 on this when it is no longer needed.
661 __nullable CF_RETURNS_RETAINED
662 SecPolicyRef
SecPolicyCreateOCSPSigner(void);
666 kSecSignSMIMEUsage
= (1 << 0),
667 kSecKeyEncryptSMIMEUsage
= (1 << 1),
668 kSecDataEncryptSMIMEUsage
= (1 << 2),
669 kSecKeyExchangeDecryptSMIMEUsage
= (1 << 3),
670 kSecKeyExchangeEncryptSMIMEUsage
= (1 << 4),
671 kSecKeyExchangeBothSMIMEUsage
= (1 << 5),
672 kSecAnyEncryptSMIME
= kSecKeyEncryptSMIMEUsage
| kSecDataEncryptSMIMEUsage
|
673 kSecKeyExchangeDecryptSMIMEUsage
| kSecKeyExchangeEncryptSMIMEUsage
,
674 kSecIgnoreExpirationSMIMEUsage
= (1 << 6)
678 @function SecPolicyCreateSMIME
679 @abstract Returns a policy object for evaluating S/MIME certificate chains.
680 @param smimeUsage Pass the bitwise or of one or more kSecXXXSMIMEUsage
681 flags, to indicate the intended usage of this certificate.
682 @param email Optional; if present, the policy will require the specified
683 email to match the email in the leaf certificate.
684 @discussion This policy uses the Basic X.509 policy with validity check and
685 requires the leaf to have
686 * a KeyUsage matching the smimeUsage,
687 * an ExtendedKeyUsage, if any, with the EmailProtection OID, and
688 * if the email param is specified, the email address in the RFC822Name in the
689 SubjectAlternativeName extension or in the Email Address field of the
691 Note that temporal validity checking can be disabled with kSecIgnoreExpirationSMIMEUsage
692 @result A policy object. The caller is responsible for calling CFRelease
693 on this when it is no longer needed.
695 __nullable CF_RETURNS_RETAINED
696 SecPolicyRef
SecPolicyCreateSMIME(CFIndex smimeUsage
, CFStringRef __nullable email
);
699 @function SecPolicyCreateCodeSigning
700 @abstract Returns a policy object for evaluating code signing certificate chains.
701 @discussion This policy uses the Basic X.509 policy with validity check and
702 requires the leaf to have
703 * a KeyUsage with both the DigitalSignature and NonRepudiation bits set, and
704 * an ExtendedKeyUsage with the AnyExtendedKeyUsage OID or the CodeSigning OID.
705 @result A policy object. The caller is responsible for calling CFRelease
706 on this when it is no longer needed.
708 __nullable CF_RETURNS_RETAINED
709 SecPolicyRef
SecPolicyCreateCodeSigning(void);
712 @function SecPolicyCreateLockdownPairing
713 @abstract basic x509 policy for checking lockdown pairing certificate chains.
714 @discussion This policy checks some of the Basic X.509 policy options with no
715 validity check. It explicitly allows for empty subjects.
716 @result A policy object. The caller is responsible for calling CFRelease
717 on this when it is no longer needed.
719 __nullable CF_RETURNS_RETAINED
720 SecPolicyRef
SecPolicyCreateLockdownPairing(void);
723 @function SecPolicyCreateURLBag
724 @abstract Returns a policy object for evaluating certificate chains for signing URL bags.
725 @discussion This policy uses the Basic X.509 policy with no validity check and requires
726 that the leaf has ExtendedKeyUsage extension with the CodeSigning OID.
727 @result A policy object. The caller is responsible for calling CFRelease
728 on this when it is no longer needed.
730 __nullable CF_RETURNS_RETAINED
731 SecPolicyRef
SecPolicyCreateURLBag(void);
734 @function SecPolicyCreateOTATasking
735 @abstract Returns a policy object for evaluating certificate chains for signing OTA Tasking.
736 @discussion This policy uses the Basic X.509 policy with validity check and
738 * The chain is anchored to any of the Apple Root CAs.
739 * There are exactly 3 certs in the chain.
740 * The intermediate has Common Name "Apple iPhone Certification Authority".
741 * The leaf has Common Name "OTA Task Signing".
742 @result A policy object. The caller is responsible for calling CFRelease
743 on this when it is no longer needed.
745 __nullable CF_RETURNS_RETAINED
746 SecPolicyRef
SecPolicyCreateOTATasking(void);
749 @function SecPolicyCreateMobileAsset
750 @abstract Returns a policy object for evaluating certificate chains for signing Mobile Assets.
751 @discussion This policy uses the Basic X.509 policy with no validity check
753 * The chain is anchored to any of the Apple Root CAs.
754 * There are exactly 3 certs in the chain.
755 * The intermediate has Common Name "Apple iPhone Certification Authority".
756 * The leaf has Common Name "Asset Manifest Signing".
757 @result A policy object. The caller is responsible for calling CFRelease
758 on this when it is no longer needed.
760 __nullable CF_RETURNS_RETAINED
761 SecPolicyRef
SecPolicyCreateMobileAsset(void);
764 @function SecPolicyCreateMobileAssetDevelopment
765 @abstract Returns a policy object for evaluating certificate chains for signing development
767 @discussion This policy uses the Basic X.509 policy with no validity check
769 * The chain is anchored to any of the Apple Root CAs.
770 * There are exactly 3 certs in the chain.
771 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.18.
772 * The leaf has a marker extension with OID 1.2.840.113635.100.6.55.1.
773 @result A policy object. The caller is responsible for calling CFRelease
774 on this when it is no longer needed.
776 __nullable CF_RETURNS_RETAINED
777 SecPolicyRef
SecPolicyCreateMobileAssetDevelopment(void)
778 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
781 @function SecPolicyCreateAppleIDAuthorityPolicy
782 @abstract Returns a policy object for evaluating certificate chains for Apple ID Authority.
783 @discussion This policy uses the Basic X.509 policy with validity check
785 * The chain is anchored to any of the Apple Root CAs.
786 * The intermediate(s) has(have) a marker extension with OID 1.2.840.113635.100.6.2.3
787 or OID 1.2.840.113635.100.6.2.7.
788 * The leaf has a marker extension with OID 1.2.840.113635.100.4.7.
789 * Revocation is checked via any available method.
790 @result A policy object. The caller is responsible for calling CFRelease
791 on this when it is no longer needed.
793 __nullable CF_RETURNS_RETAINED
794 SecPolicyRef
SecPolicyCreateAppleIDAuthorityPolicy(void);
797 @function SecPolicyCreateMacAppStoreReceipt
798 @abstract Returns a policy object for evaluating certificate chains for signing
799 Mac App Store Receipts.
800 @discussion This policy uses the Basic X.509 policy with validity check
802 * The chain is anchored to any of the Apple Root CAs.
803 * There are exactly 3 certs in the chain.
804 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.1.
805 * The leaf has CertificatePolicy extension with OID 1.2.840.113635.100.5.6.1.
806 * The leaf has a marker extension with OID 1.2.840.113635.100.6.11.1.
807 * Revocation is checked via any available method.
808 @result A policy object. The caller is responsible for calling CFRelease
809 on this when it is no longer needed.
811 __nullable CF_RETURNS_RETAINED
812 SecPolicyRef
SecPolicyCreateMacAppStoreReceipt(void);
815 @function SecPolicyCreatePassbookCardSigner
816 @abstract Returns a policy object for evaluating certificate chains for signing Passbook cards.
817 @param cardIssuer Required; must match name in marker extension.
818 @param teamIdentifier Optional; if present, the policy will require the specified
819 team ID to match the organizationalUnit field in the leaf certificate's subject.
820 @discussion This policy uses the Basic X.509 policy with validity check
822 * The chain is anchored to any of the Apple Root CAs.
823 * The leaf has a marker extension with OID 1.2.840.113635.100.6.1.16 and containing the
825 * The leaf has ExtendedKeyUsage with OID 1.2.840.113635.100.4.14.
826 * The leaf has a Organizational Unit matching the TeamID.
827 @result A policy object. The caller is responsible for calling CFRelease
828 on this when it is no longer needed.
830 __nullable CF_RETURNS_RETAINED
831 SecPolicyRef
SecPolicyCreatePassbookCardSigner(CFStringRef cardIssuer
,
832 CFStringRef __nullable teamIdentifier
);
835 @function SecPolicyCreateMobileStoreSigner
836 @abstract Returns a policy object for evaluating Mobile Store certificate chains.
837 @discussion This policy uses the Basic X.509 policy with validity check
839 * The chain is anchored to any of the Apple Root CAs.
840 * There are exactly 3 certs in the chain.
841 * The intermediate has Common Name "Apple System Integration 2 Certification Authority".
842 * The leaf has KeyUsage with the DigitalSignature bit set.
843 * The leaf has CertificatePolicy extension with OID 1.2.840.113635.100.5.12.
844 @result A policy object. The caller is responsible for calling CFRelease
845 on this when it is no longer needed.
847 __nullable CF_RETURNS_RETAINED
848 SecPolicyRef
SecPolicyCreateMobileStoreSigner(void);
851 @function SecPolicyCreateTestMobileStoreSigner
852 @abstract Returns a policy object for evaluating Test Mobile Store certificate chains.
853 @discussion This policy uses the Basic X.509 policy with validity check
855 * The chain is anchored to any of the Apple Root CAs.
856 * There are exactly 3 certs in the chain.
857 * The intermediate has Common Name "Apple System Integration 2 Certification Authority".
858 * The leaf has KeyUsage with the DigitalSignature bit set.
859 * The leaf has CertificatePolicy extension with OID 1.2.840.113635.100.5.12.1.
860 @result A policy object. The caller is responsible for calling CFRelease
861 on this when it is no longer needed.
863 __nullable CF_RETURNS_RETAINED
864 SecPolicyRef
SecPolicyCreateTestMobileStoreSigner(void);
867 @function SecPolicyCreateEscrowServiceSigner
868 @abstract Returns a policy object for evaluating Escrow Service certificate chains.
869 @discussion This policy uses the Basic X.509 policy with no validity check
871 * There are exactly 2 certs in the chain.
872 * The leaf has KeyUsage with the KeyEncipherment bit set.
873 @result A policy object. The caller is responsible for calling CFRelease
874 on this when it is no longer needed.
876 __nullable CF_RETURNS_RETAINED
877 SecPolicyRef
SecPolicyCreateEscrowServiceSigner(void);
880 @function SecPolicyCreatePCSEscrowServiceSigner
881 @abstract Returns a policy object for evaluating PCS Escrow Service certificate chains.
882 @discussion This policy uses the Basic X.509 policy with validity check
884 * There are exactly 2 certs in the chain.
885 * The leaf has KeyUsage with the KeyEncipherment bit set.
886 @result A policy object. The caller is responsible for calling CFRelease
887 on this when it is no longer needed.
889 __nullable CF_RETURNS_RETAINED
890 SecPolicyRef
SecPolicyCreatePCSEscrowServiceSigner(void);
893 @function SecPolicyCreateOSXProvisioningProfileSigning
894 @abstract Returns a policy object for evaluating certificate chains for signing OS X
895 Provisioning Profiles.
896 @discussion This policy uses the Basic X.509 policy with validity check
898 * The chain is anchored to any of the Apple Root CAs.
899 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.1.
900 * The leaf has KeyUsage with the DigitalSignature bit set.
901 * The leaf has a marker extension with OID 1.2.840.113635.100.4.11.
902 * Revocation is checked via OCSP.
903 @result A policy object. The caller is responsible for calling CFRelease
904 on this when it is no longer needed.
906 __nullable CF_RETURNS_RETAINED
907 SecPolicyRef
SecPolicyCreateOSXProvisioningProfileSigning(void);
910 @function SecPolicyCreateConfigurationProfileSigner
911 @abstract Returns a policy object for evaluating certificate chains for signing
912 Configuration Profiles.
913 @discussion This policy uses the Basic X.509 policy with validity check
915 * The chain is anchored to any of the Apple Root CAs.
916 * There are exactly 3 certs in the chain.
917 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.3.
918 * The leaf has ExtendedKeyUsage with OID 1.2.840.113635.100.4.16.
919 @result A policy object. The caller is responsible for calling CFRelease
920 on this when it is no longer needed.
922 __nullable CF_RETURNS_RETAINED
923 SecPolicyRef
SecPolicyCreateConfigurationProfileSigner(void);
926 @function SecPolicyCreateQAConfigurationProfileSigner
927 @abstract Returns a policy object for evaluating certificate chains for signing
928 QA Configuration Profiles. On customer builds, this function returns the same
929 policy as SecPolicyCreateConfigurationProfileSigner.
930 @discussion This policy uses the Basic X.509 policy with validity check
932 * The chain is anchored to any of the Apple Root CAs.
933 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.3.
934 * The leaf has ExtendedKeyUsage with OID 1.2.840.113635.100.4.17.
935 @result A policy object. The caller is responsible for calling CFRelease
936 on this when it is no longer needed.
938 __nullable CF_RETURNS_RETAINED
939 SecPolicyRef
SecPolicyCreateQAConfigurationProfileSigner(void);
942 @function SecPolicyCreateAppleIDValidationRecordSigningPolicy
943 @abstract Returns a policy object for evaluating certificate chains for signing
944 Apple ID Validation Records.
945 @discussion This policy uses the Basic X.509 policy with validity check
947 * The chain is anchored to any of the Apple Root CAs.
948 * The intermediate(s) has(have) a marker extension with OID 1.2.840.113635.100.6.2.3
949 or OID 1.2.840.113635.100.6.2.10.
950 * The leaf has a marker extension with OID 1.2.840.113635.100.6.25.
951 * Revocation is checked via OCSP.
952 @result A policy object. The caller is responsible for calling CFRelease
953 on this when it is no longer needed.
955 __nullable CF_RETURNS_RETAINED
956 SecPolicyRef
SecPolicyCreateAppleIDValidationRecordSigningPolicy(void);
959 @function SecPolicyCreateAppleSMPEncryption
960 @abstract Returns a policy object for evaluating SMP certificate chains.
961 @discussion This policy uses the Basic X.509 policy with no validity check
963 * The chain is anchored to any of the Apple Root CAs.
964 * There are exactly 3 certs in the chain.
965 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.13.
966 * The leaf has KeyUsage with the KeyEncipherment bit set.
967 * The leaf has a marker extension with OID 1.2.840.113635.100.6.30.
968 * Revocation is checked via OCSP.
969 @result A policy object. The caller is responsible for calling CFRelease
970 on this when it is no longer needed.
972 __nullable CF_RETURNS_RETAINED
973 SecPolicyRef
SecPolicyCreateAppleSMPEncryption(void);
976 @function SecPolicyCreateTestAppleSMPEncryption
977 @abstract Returns a policy object for evaluating Test SMP certificate chains.
978 @discussion This policy uses the Basic X.509 policy with no validity check
980 * The chain is anchored to a Test Apple Root with ECC public key certificate.
981 * There are exactly 3 certs in the chain.
982 * The intermediate has Common Name "Test Apple System Integration CA - ECC".
983 * The leaf has KeyUsage with the KeyEncipherment bit set.
984 * Revocation is checked via OCSP.
985 @result A policy object. The caller is responsible for calling CFRelease
986 on this when it is no longer needed.
988 __nullable CF_RETURNS_RETAINED
989 SecPolicyRef
SecPolicyCreateTestAppleSMPEncryption(void);
992 @function SecPolicyCreateApplePPQSigning
993 @abstract Returns a policy object for verifying production PPQ Signing certificates.
994 @discussion This policy uses the Basic X.509 policy with no validity check
996 * The chain is anchored to any of the Apple Root CAs.
997 * There are exactly 3 certs in the chain.
998 * The intermediate has Common Name "Apple System Integration 2 Certification
1000 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.10.
1001 * The leaf has KeyUsage with the DigitalSignature bit set.
1002 * The leaf has a marker extension with OID 1.2.840.113635.100.6.38.2.
1003 @result A policy object. The caller is responsible for calling CFRelease
1004 on this when it is no longer needed.
1006 __nullable CF_RETURNS_RETAINED
1007 SecPolicyRef
SecPolicyCreateApplePPQSigning(void);
1010 @function SecPolicyCreateTestApplePPQSigning
1011 @abstract Returns a policy object for verifying test PPQ Signing certificates. On
1012 customer builds, this function returns the same policy as SecPolicyCreateApplePPQSigning.
1013 @discussion This policy uses the Basic X.509 policy with no validity check
1014 and pinning options:
1015 * The chain is anchored to any of the Apple Root CAs.
1016 * There are exactly 3 certs in the chain.
1017 * The intermediate has Common Name "Apple System Integration 2 Certification
1019 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.10.
1020 * The leaf has KeyUsage with the DigitalSignature bit set.
1021 * The leaf has a marker extension with OID 1.2.840.113635.100.6.38.1.
1022 @result A policy object. The caller is responsible for calling CFRelease
1023 on this when it is no longer needed.
1025 __nullable CF_RETURNS_RETAINED
1026 SecPolicyRef
SecPolicyCreateTestApplePPQSigning(void);
1029 @function SecPolicyCreateAppleIDSService
1030 @abstract Ensure we're appropriately pinned to the IDS service (SSL + Apple restrictions)
1031 @discussion This policy uses the Basic X.509 policy with validity check
1032 and pinning options:
1033 * The chain is anchored to any of the Apple Root CAs.
1034 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1035 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.4.2 or,
1036 if Test Roots are allowed, OID 1.2.840.113635.100.6.27.4.1.
1037 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName
1039 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1040 * Revocation is checked via any available method.
1041 @result A policy object. The caller is responsible for calling CFRelease
1042 on this when it is no longer needed.
1044 __nullable CF_RETURNS_RETAINED
1045 SecPolicyRef
SecPolicyCreateAppleIDSService(CFStringRef __nullable hostname
);
1048 @function SecPolicyCreateAppleIDSServiceContext
1049 @abstract Ensure we're appropriately pinned to the IDS service (SSL + Apple restrictions)
1050 @param hostname Required; hostname to verify the certificate name against.
1051 @param context Optional; if present, "AppleServerAuthenticationAllowUATIDS" with value
1052 Boolean true will allow Test Apple roots on internal releases.
1053 @discussion This policy uses the Basic X.509 policy with validity check
1054 and pinning options:
1055 * The chain is anchored to any of the Apple Root CAs.
1056 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1057 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.4.2 or,
1058 if Test Roots are allowed, OID 1.2.840.113635.100.6.27.4.1.
1059 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1060 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1061 * Revocation is checked via any available method.
1062 @result A policy object. The caller is responsible for calling CFRelease
1063 on this when it is no longer needed.
1065 __nullable CF_RETURNS_RETAINED
1066 SecPolicyRef
SecPolicyCreateAppleIDSServiceContext(CFStringRef hostname
, CFDictionaryRef __nullable context
);
1069 @function SecPolicyCreateApplePushService
1070 @abstract Ensure we're appropriately pinned to the Apple Push service (SSL + Apple restrictions)
1071 @param hostname Required; hostname to verify the certificate name against.
1072 @param context Optional; if present, "AppleServerAuthenticationAllowUATAPN" with value
1073 Boolean true will allow Test Apple roots on internal releases.
1074 @discussion This policy uses the Basic X.509 policy with validity check
1075 and pinning options:
1076 * The chain is anchored to any of the Apple Root CAs.
1077 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1078 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.5.2 or,
1079 if Test Roots are allowed, OID 1.2.840.113635.100.6.27.5.1.
1080 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1081 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1082 * Revocation is checked via any available method.
1083 @result A policy object. The caller is responsible for calling CFRelease
1084 on this when it is no longer needed.
1086 __nullable CF_RETURNS_RETAINED
1087 SecPolicyRef
SecPolicyCreateApplePushService(CFStringRef hostname
, CFDictionaryRef __nullable context
);
1090 @function SecPolicyCreateApplePushServiceLegacy
1091 @abstract Ensure we're appropriately pinned to the Push service (via Entrust)
1092 @param hostname Required; hostname to verify the certificate name against.
1093 @discussion This policy uses the Basic X.509 policy with validity check
1094 and pinning options:
1095 * The chain is anchored to an Entrust Intermediate.
1096 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1097 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1098 * Revocation is checked via any available method.
1099 @result A policy object. The caller is responsible for calling CFRelease
1100 on this when it is no longer needed.
1102 __nullable CF_RETURNS_RETAINED
1103 SecPolicyRef
SecPolicyCreateApplePushServiceLegacy(CFStringRef hostname
);
1106 @function SecPolicyCreateAppleMMCSService
1107 @abstract Ensure we're appropriately pinned to the MMCS service (SSL + Apple restrictions)
1108 @param hostname Required; hostname to verify the certificate name against.
1109 @param context Optional; if present, "AppleServerAuthenticationAllowUATMMCS" with value
1110 Boolean true will allow Test Apple roots and test OIDs on internal releases.
1111 @discussion This policy uses the Basic X.509 policy with validity check
1112 and pinning options:
1113 * The chain is anchored to any of the Apple Root CAs.
1114 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1115 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.11.2 or, if
1116 enabled, OID 1.2.840.113635.100.6.27.11.1.
1117 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1118 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1119 * Revocation is checked via any available method.
1120 @result A policy object. The caller is responsible for calling CFRelease
1121 on this when it is no longer needed.
1123 __nullable CF_RETURNS_RETAINED
1124 SecPolicyRef
SecPolicyCreateAppleMMCSService(CFStringRef hostname
, CFDictionaryRef __nullable context
);
1127 @function SecPolicyCreateAppleCompatibilityMMCSService
1128 @abstract Ensure we're appropriately pinned to the MMCS service using compatibility certs
1129 @param hostname Required; hostname to verify the certificate name against.
1130 @discussion This policy uses the Basic X.509 policy with validity check
1131 and pinning options:
1132 * The chain is anchored to the GeoTrust Global CA
1133 * The intermediate has a subject public key info hash matching the public key of
1134 the Apple IST CA G1 intermediate.
1135 * The chain length is 3.
1136 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.11.2 or
1137 OID 1.2.840.113635.100.6.27.11.1.
1138 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1139 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1140 @result A policy object. The caller is responsible for calling CFRelease
1141 on this when it is no longer needed.
1143 __nullable CF_RETURNS_RETAINED
1144 SecPolicyRef
SecPolicyCreateAppleCompatibilityMMCSService(CFStringRef hostname
)
1145 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
1148 @function SecPolicyCreateAppleGSService
1149 @abstract Ensure we're appropriately pinned to the GS service (SSL + Apple restrictions)
1150 @param hostname Required; hostname to verify the certificate name against.
1151 @param context Optional; if present, "AppleServerAuthenticationAllowUATGS" with value
1152 Boolean true will allow Test Apple roots on internal releases.
1153 @discussion This policy uses the Basic X.509 policy with validity check
1154 and pinning options:
1155 * The chain is anchored to any of the Apple Root CAs.
1156 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1157 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.2.
1158 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1159 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1160 * Revocation is checked via any available method.
1161 @result A policy object. The caller is responsible for calling CFRelease
1162 on this when it is no longer needed.
1164 __nullable CF_RETURNS_RETAINED
1165 SecPolicyRef
SecPolicyCreateAppleGSService(CFStringRef hostname
, CFDictionaryRef __nullable context
)
1166 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
1169 @function SecPolicyCreateApplePPQService
1170 @abstract Ensure we're appropriately pinned to the PPQ service (SSL + Apple restrictions)
1171 @param hostname Required; hostname to verify the certificate name against.
1172 @param context Optional; if present, "AppleServerAuthenticationAllowUATPPQ" with value
1173 Boolean true will allow Test Apple roots on internal releases.
1174 @discussion This policy uses the Basic X.509 policy with validity check
1175 and pinning options:
1176 * The chain is anchored to any of the Apple Root CAs.
1177 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1178 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.3.2 or,
1179 if Test Roots are allowed, OID 1.2.840.113635.100.6.27.3.1.
1180 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1181 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1182 * Revocation is checked via any available method.
1183 @result A policy object. The caller is responsible for calling CFRelease
1184 on this when it is no longer needed.
1186 __nullable CF_RETURNS_RETAINED
1187 SecPolicyRef
SecPolicyCreateApplePPQService(CFStringRef hostname
, CFDictionaryRef __nullable context
)
1188 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
1191 @function SecPolicyCreateAppleAST2Service
1192 @abstract Ensure we're appropriately pinned to the AST2 Diagnostic service (SSL + Apple restrictions)
1193 @param hostname Required; hostname to verify the certificate name against.
1194 @param context Optional; if present, "AppleServerAuthenticationAllowUATAST2" with value
1195 Boolean true will allow Test Apple roots on internal releases.
1196 @discussion This policy uses the Basic X.509 policy with validity check
1197 and pinning options:
1198 * The chain is anchored to any of the Apple Root CAs.
1199 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1200 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.8.2 or,
1201 if Test Roots are allowed, OID 1.2.840.113635.100.6.27.8.1.
1202 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1203 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1204 * Revocation is checked via any available method.
1205 @result A policy object. The caller is responsible for calling CFRelease
1206 on this when it is no longer needed.
1208 __nullable CF_RETURNS_RETAINED
1209 SecPolicyRef
SecPolicyCreateAppleAST2Service(CFStringRef hostname
, CFDictionaryRef __nullable context
)
1210 __OSX_AVAILABLE_STARTING(__MAC_10_11_4
, __IPHONE_9_3
);
1213 @function SecPolicyCreateAppleEscrowProxyService
1214 @abstract Ensure we're appropriately pinned to the iCloud Escrow Proxy service (SSL + Apple restrictions)
1215 @param hostname Required; hostname to verify the certificate name against.
1216 @param context Optional; if present, "AppleServerAuthenticationAllowUATEscrow" with value
1217 Boolean true will allow Test Apple roots on internal releases.
1218 @discussion This policy uses the Basic X.509 policy with validity check
1219 and pinning options:
1220 * The chain is anchored to any of the Apple Root CAs.
1221 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1222 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.7.2 or,
1223 if Test Roots are allowed, OID 1.2.840.113635.100.6.27.7.1.
1224 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1225 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1226 * Revocation is checked via any available method.
1227 @result A policy object. The caller is responsible for calling CFRelease
1228 on this when it is no longer needed.
1230 __nullable CF_RETURNS_RETAINED
1231 SecPolicyRef
SecPolicyCreateAppleEscrowProxyService(CFStringRef hostname
, CFDictionaryRef __nullable context
)
1232 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
1235 @function SecPolicyCreateAppleCompatibilityEscrowProxyService
1236 @abstract Ensure we're appropriately pinned to the iCloud Escrow Proxy service using compatibility certs
1237 @param hostname Required; hostname to verify the certificate name against.
1238 @discussion This policy uses the Basic X.509 policy with validity check
1239 and pinning options:
1240 * The chain is anchored to the GeoTrust Global CA
1241 * The intermediate has a subject public key info hash matching the public key of
1242 the Apple IST CA G1 intermediate.
1243 * The chain length is 3.
1244 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.7.2 or,
1245 if UAT is enabled with a defaults write (internal devices only),
1246 OID 1.2.840.113635.100.6.27.7.1.
1247 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1248 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1249 @result A policy object. The caller is responsible for calling CFRelease
1250 on this when it is no longer needed.
1252 __nullable CF_RETURNS_RETAINED
1253 SecPolicyRef
SecPolicyCreateAppleCompatibilityEscrowProxyService(CFStringRef hostname
)
1254 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
1257 @function SecPolicyCreateAppleFMiPService
1258 @abstract Ensure we're appropriately pinned to the Find My iPhone service (SSL + Apple restrictions)
1259 @param hostname Required; hostname to verify the certificate name against.
1260 @param context Optional; if present, "AppleServerAuthenticationAllowUATFMiP" with value
1261 Boolean true will allow Test Apple roots on internal releases.
1262 @discussion This policy uses the Basic X.509 policy with validity check
1263 and pinning options:
1264 * The chain is anchored to any of the Apple Root CAs.
1265 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1266 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.6.2 or,
1267 if Test Roots are allowed, OID 1.2.840.113635.100.6.27.6.1.
1268 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1269 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1270 * Revocation is checked via any available method.
1271 @result A policy object. The caller is responsible for calling CFRelease
1272 on this when it is no longer needed.
1274 __nullable CF_RETURNS_RETAINED
1275 SecPolicyRef
SecPolicyCreateAppleFMiPService(CFStringRef hostname
, CFDictionaryRef __nullable context
)
1276 __OSX_AVAILABLE_STARTING(__MAC_10_12
, __IPHONE_10_0
);
1279 @function SecPolicyCreateAppleSSLService
1280 @abstract Ensure we're appropriately pinned to an Apple server (SSL + Apple restrictions)
1281 @param hostname Optional; hostname to verify the certificate name against.
1282 @discussion This policy uses the Basic X.509 policy with validity check
1283 and pinning options:
1284 * The chain is anchored to any of the Apple Root CAs.
1285 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1286 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.1
1287 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1288 * The leaf has ExtendedKeyUsage, if any, with the ServerAuth OID.
1289 * Revocation is checked via any available method.
1290 @result A policy object. The caller is responsible for calling CFRelease
1291 on this when it is no longer needed.
1293 __nullable CF_RETURNS_RETAINED
1294 SecPolicyRef
SecPolicyCreateAppleSSLService(CFStringRef __nullable hostname
);
1297 @function SecPolicyCreateAppleTimeStamping
1298 @abstract Returns a policy object for evaluating time stamping certificate chains.
1299 @discussion This policy uses the Basic X.509 policy with validity check
1300 and requires the leaf has ExtendedKeyUsage with the TimeStamping OID.
1301 @result A policy object. The caller is responsible for calling CFRelease
1302 on this when it is no longer needed.
1304 __nullable CF_RETURNS_RETAINED
1305 SecPolicyRef
SecPolicyCreateAppleTimeStamping(void);
1308 @function SecPolicyCreateApplePayIssuerEncryption
1309 @abstract Returns a policy object for evaluating Apple Pay Issuer Encryption certificate chains.
1310 @discussion This policy uses the Basic X.509 policy with no validity check
1311 and pinning options:
1312 * The chain is anchored to any of the Apple Root CAs.
1313 * There are exactly 3 certs in the chain.
1314 * The intermediate has Common Name "Apple Worldwide Developer Relations CA - G2".
1315 * The leaf has KeyUsage with the KeyEncipherment bit set.
1316 * The leaf has a marker extension with OID 1.2.840.113635.100.6.39.
1317 @result A policy object. The caller is responsible for calling CFRelease
1318 on this when it is no longer needed.
1320 __nullable CF_RETURNS_RETAINED
1321 SecPolicyRef
SecPolicyCreateApplePayIssuerEncryption(void)
1322 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
1325 @function SecPolicyCreateAppleATVVPNProfileSigning
1326 @abstract Returns a policy object for evaluating Apple TV VPN Profile certificate chains.
1327 @discussion This policy uses the Basic X.509 policy with no validity check
1328 and pinning options:
1329 * The chain is anchored to any of the Apple Root CAs.
1330 * There are exactly 3 certs in the chain.
1331 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.10.
1332 * The leaf has a marker extension with OID 1.2.840.113635.100.6.43.
1333 * Revocation is checked via OCSP.
1334 @result A policy object. The caller is responsible for calling CFRelease
1335 on this when it is no longer needed.
1337 __nullable CF_RETURNS_RETAINED
1338 SecPolicyRef
SecPolicyCreateAppleATVVPNProfileSigning(void)
1339 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
1342 @function SecPolicyCreateAppleHomeKitServerAuth
1343 @abstract Ensure we're appropriately pinned to the HomeKit service (SSL + Apple restrictions)
1344 @param hostname Required; hostname to verify the certificate name against.
1345 @discussion This policy uses the Basic X.509 policy with validity check
1346 and pinning options:
1347 * The chain is anchored to any of the Apple Root CAs.
1348 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.16
1349 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.9.
1350 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1351 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1352 * Revocation is checked via any available method.
1353 @result A policy object. The caller is responsible for calling CFRelease
1354 on this when it is no longer needed.
1356 __nullable CF_RETURNS_RETAINED
1357 SecPolicyRef
SecPolicyCreateAppleHomeKitServerAuth(CFStringRef hostname
)
1358 __OSX_AVAILABLE_STARTING(__MAC_10_11_4
, __IPHONE_9_3
);
1361 @function SecPolicyCreateAppleExternalDeveloper
1362 @abstract Returns a policy object for verifying Apple-issued external developer
1364 @discussion The resulting policy uses the Basic X.509 policy with validity check and
1366 * The chain is anchored to any of the Apple Root CAs.
1367 * There are exactly 3 certs in the chain.
1368 * The intermediate has a marker extension with OID matching 1.2.840.113635.100.6.2.1
1369 (WWDR CA) or 1.2.840.113635.100.6.2.6 (Developer ID CA).
1370 * The leaf has a marker extension with OID matching one of the following:
1371 * 1.2.840.113635.100.6.1.2 ("iPhone Developer" leaf)
1372 * 1.2.840.113635.100.6.1.4 ("iPhone Distribution" leaf)
1373 * 1.2.840.113635.100.6.1.5 ("Safari Developer" leaf)
1374 * 1.2.840.113635.100.6.1.7 ("3rd Party Mac Developer Application" leaf)
1375 * 1.2.840.113635.100.6.1.8 ("3rd Party Mac Developer Installer" leaf)
1376 * 1.2.840.113635.100.6.1.12 ("Mac Developer" leaf)
1377 * 1.2.840.113635.100.6.1.13 ("Developer ID Application" leaf)
1378 * 1.2.840.113635.100.6.1.14 ("Developer ID Installer" leaf)
1379 * The leaf has an ExtendedKeyUsage OID matching one of the following:
1380 * 1.3.6.1.5.5.7.3.3 (CodeSigning EKU)
1381 * 1.2.840.113635.100.4.8 ("Safari Developer" EKU)
1382 * 1.2.840.113635.100.4.9 ("3rd Party Mac Developer Installer" EKU)
1383 * 1.2.840.113635.100.4.13 ("Developer ID Installer" EKU)
1384 * Revocation is checked via any available method.
1385 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1386 @result A policy object. The caller is responsible for calling CFRelease on this when
1387 it is no longer needed.
1389 __nullable CF_RETURNS_RETAINED
1390 SecPolicyRef
SecPolicyCreateAppleExternalDeveloper(void)
1391 __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
1394 @function SecPolicyCreateAppleSoftwareSigning
1395 @abstract Returns a policy object for verifying the Apple Software Signing certificate.
1396 @discussion The resulting policy uses the Basic X.509 policy with no validity check and
1398 * The chain is anchored to any of the Apple Root CAs.
1399 * There are exactly 3 certs in the chain.
1400 * The intermediate has the Common Name "Apple Code Signing Certification Authority".
1401 * The leaf has a marker extension with OID matching 1.2.840.113635.100.6.22.
1402 * The leaf has an ExtendedKeyUsage OID matching 1.3.6.1.5.5.7.3.3 (Code Signing).
1403 * Revocation is checked via any available method.
1404 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1405 @result A policy object. The caller is responsible for calling CFRelease on this when
1406 it is no longer needed.
1408 __nullable CF_RETURNS_RETAINED
1409 SecPolicyRef
SecPolicyCreateAppleSoftwareSigning(void)
1410 __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
1413 @function SecPolicyGetName
1414 @abstract Returns a policy's name.
1415 @param policy A policy reference.
1416 @result A policy name.
1418 __nullable CFStringRef
SecPolicyGetName(SecPolicyRef policy
)
1419 __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
1422 @function SecPolicyGetOidString
1423 @abstract Returns a policy's oid in string decimal format.
1424 @param policy A policy reference.
1425 @result A policy oid.
1427 CFStringRef
SecPolicyGetOidString(SecPolicyRef policy
)
1428 __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
1431 @function SecPolicyCreateAppleUniqueDeviceCertificate
1432 @abstract Returns a policy object for verifying Unique Device Identifier Certificates.
1433 @param testRootHash Optional; The SHA-256 fingerprint of a test root for pinning.
1434 @discussion The resulting policy uses the Basic X.509 policy with no validity check and
1436 * The chain is anchored to the SEP Root CA. Internal releases allow the chain to be
1437 anchored to the testRootHash input if the value true is set for the key
1438 "ApplePinningAllowTestCertsUCRT" in the com.apple.security preferences for the user
1439 of the calling application.
1440 * There are exactly 3 certs in the chain.
1441 * The intermediate has an extension with OID matching 1.2.840.113635.100.6.44 and value
1443 * The leaf has a marker extension with OID matching 1.2.840.113635.100.10.1.
1444 * RSA key sizes are disallowed. EC key sizes are P-256 or larger.
1445 @result A policy object. The caller is responsible for calling CFRelease on this when
1446 it is no longer needed.
1448 __nullable CF_RETURNS_RETAINED
1449 SecPolicyRef
SecPolicyCreateAppleUniqueDeviceCertificate(CFDataRef __nullable testRootHash
)
1450 __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0);
1453 @function SecPolicyCreateAppleWarsaw
1454 @abstract Returns a policy object for verifying signed Warsaw assets.
1455 @discussion The resulting policy uses the Basic X.509 policy with validity check and
1457 * The chain is anchored to any of the Apple Root CAs.
1458 * There are exactly 3 certs in the chain.
1459 * The intermediate has an extension with OID matching 1.2.840.113635.100.6.2.14.
1460 * The leaf has a marker extension with OID matching 1.2.840.113635.100.6.29.
1461 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1462 @result A policy object. The caller is responsible for calling CFRelease on this when
1463 it is no longer needed.
1465 __nullable CF_RETURNS_RETAINED
1466 SecPolicyRef
SecPolicyCreateAppleWarsaw(void)
1467 __OSX_AVAILABLE(10.12.1) __IOS_AVAILABLE(10.1) __TVOS_AVAILABLE(10.0.1) __WATCHOS_AVAILABLE(3.1);
1470 @function SecPolicyCreateAppleSecureIOStaticAsset
1471 @abstract Returns a policy object for verifying signed static assets for Secure IO.
1472 @discussion The resulting policy uses the Basic X.509 policy with no validity check and
1474 * The chain is anchored to any of the Apple Root CAs.
1475 * There are exactly 3 certs in the chain.
1476 * The intermediate has an extension with OID matching 1.2.840.113635.100.6.2.10.
1477 * The leaf has a marker extension with OID matching 1.2.840.113635.100.6.50.
1478 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1479 @result A policy object. The caller is responsible for calling CFRelease on this when
1480 it is no longer needed.
1482 __nullable CF_RETURNS_RETAINED
1483 SecPolicyRef
SecPolicyCreateAppleSecureIOStaticAsset(void)
1484 __OSX_AVAILABLE(10.12.1) __IOS_AVAILABLE(10.1) __TVOS_AVAILABLE(10.0.1) __WATCHOS_AVAILABLE(3.1);
1487 @function SecPolicyCreateAppleiCloudSetupService
1488 @abstract Ensure we're appropriately pinned to the iCloud Setup service (SSL + Apple restrictions)
1489 @param hostname Required; hostname to verify the certificate name against.
1490 @param context Optional; if present, "AppleServerAuthenticationAllowUATiCloudSetup" with value
1491 Boolean true will allow Test Apple roots and test OIDs on internal releases.
1492 @discussion This policy uses the Basic X.509 policy with validity check
1493 and pinning options:
1494 * The chain is anchored to any of the Apple Root CAs.
1495 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.12.
1496 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.15.2 or, if
1497 enabled, OID 1.2.840.113635.100.6.27.15.1.
1498 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1499 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1500 * Revocation is checked via any available method.
1501 @result A policy object. The caller is responsible for calling CFRelease
1502 on this when it is no longer needed.
1504 __nullable CF_RETURNS_RETAINED
1505 SecPolicyRef
SecPolicyCreateAppleiCloudSetupService(CFStringRef hostname
, CFDictionaryRef __nullable context
)
1506 __OSX_AVAILABLE(10.12.4) __IOS_AVAILABLE(10.3) __TVOS_AVAILABLE(10.2) __WATCHOS_AVAILABLE(3.2);
1509 @function SecPolicyCreateAppleCompatibilityiCloudSetupService
1510 @abstract Ensure we're appropriately pinned to the iCloud Setup service using compatibility certs
1511 @param hostname Required; hostname to verify the certificate name against.
1512 @discussion This policy uses the Basic X.509 policy with validity check
1513 and pinning options:
1514 * The chain is anchored to the GeoTrust Global CA
1515 * The intermediate has a subject public key info hash matching the public key of
1516 the Apple IST CA G1 intermediate.
1517 * The chain length is 3.
1518 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.15.2 or
1519 OID 1.2.840.113635.100.6.27.15.1.
1520 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName extension.
1521 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
1522 @result A policy object. The caller is responsible for calling CFRelease
1523 on this when it is no longer needed.
1525 __nullable CF_RETURNS_RETAINED
1526 SecPolicyRef
SecPolicyCreateAppleCompatibilityiCloudSetupService(CFStringRef hostname
)
1527 __OSX_AVAILABLE(10.12.4) __IOS_AVAILABLE(10.3) __TVOS_AVAILABLE(10.2) __WATCHOS_AVAILABLE(3.2);
1530 @function SecPolicyCreateAppleAppTransportSecurity
1531 @abstract Ensure all certs in the evaluation meet ATS minimums
1532 @discussion This policy is meant to be used alongside an SSL policy in order to enforce App Transport Security certificate rules:
1533 * All certificates use either RSA key sizes of 2048-bits or larger or EC key sizes of 256-bits or larger.
1534 * All certificates use SHA-256 or better for signature hash algorithms.
1535 @result A policy object. The caller is responsible for calling CFRelease
1536 on this when it is no longer needed.
1538 __nullable CF_RETURNS_RETAINED
1539 SecPolicyRef
SecPolicyCreateAppleAppTransportSecurity(void)
1540 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
1543 @function SecPolicyCreateMobileSoftwareUpdate
1544 @abstract Returns a policy object for evaluating certificate chains for signing Mobile Software Updates.
1545 @discussion This policy uses the Basic X.509 policy with no validity check
1546 and pinning options:
1547 * The chain is anchored to any of the Apple Root CAs.
1548 * There are exactly 3 certs in the chain.
1549 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.18.
1550 * The leaf has a marker extension with OID 1.2.840.113635.100.6.57.2, or on internal releases,
1551 1.2.840.113635.100.6.57.1.
1552 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1553 @result A policy object. The caller is responsible for calling CFRelease
1554 on this when it is no longer needed.
1556 __nullable CF_RETURNS_RETAINED
1557 SecPolicyRef
SecPolicyCreateMobileSoftwareUpdate(void)
1558 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
1561 @function SecPolicyCreateAppleBasicAttestationSystem
1562 @abstract Returns a policy object for verifying Basic Attestation Authority SCRT-attested certs
1563 @param testRootHash Optional; The SHA-256 fingerprint of a test root for pinning.
1564 @discussion The resulting policy uses the Basic X.509 policy with validity check and
1566 * The chain is anchored to the Basic Attestation System Root CA.
1567 * There are exactly 3 certs in the chain.
1568 @result A policy object. The caller is responsible for calling CFRelease on this when
1569 it is no longer needed.
1571 __nullable CF_RETURNS_RETAINED
1572 SecPolicyRef
SecPolicyCreateAppleBasicAttestationSystem(CFDataRef __nullable testRootHash
)
1573 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
1576 @function SecPolicyCreateAppleBasicAttestationUser
1577 @abstract Returns a policy object for verifying Basic Attestation Authority UCRT-attested certs
1578 @param testRootHash Optional; The SHA-256 fingerprint of a test root for pinning.
1579 @discussion The resulting policy uses the Basic X.509 policy with validity check and
1581 * The chain is anchored to the Basic Attestation User Root CA.
1582 * There are exactly 3 certs in the chain.
1583 @result A policy object. The caller is responsible for calling CFRelease on this when
1584 it is no longer needed.
1586 __nullable CF_RETURNS_RETAINED
1587 SecPolicyRef
SecPolicyCreateAppleBasicAttestationUser(CFDataRef __nullable testRootHash
)
1588 __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0);
1591 @function SecPolicyCreateiAPSWAuth
1592 @abstract Returns a policy object for verifying iAP Software Auth certificates
1593 @discussion The resulting policy uses the Basic X.509 policy with no validity check
1594 and pinning options:
1595 * There are exactly 2 certs in the chain.
1596 * The leaf has a marker extension with OID 1.2.840.113635.100.6.59.1
1597 The intended use of this policy is that the caller pass in the
1598 SW Auth root to SecTrustSetAnchorCertificates().
1599 @result A policy object. The caller is responsible for calling CFRelease on this when
1600 it is no longer needed.
1602 __nullable CF_RETURNS_RETAINED
1603 SecPolicyRef
SecPolicyCreateiAPSWAuth(void)
1604 __OSX_AVAILABLE(10.13.4) __IOS_AVAILABLE(11.3) __TVOS_AVAILABLE(11.3) __WATCHOS_AVAILABLE(4.3);
1607 @function SecPolicyCreateDemoDigitalCatalog
1608 @abstract Returns a policy object for evaluating certificate chains for signing Digital
1609 Catalog manifests for Demo units.
1610 @discussion This policy uses the Basic X.509 policy with validity check and
1612 * There are exactly 3 certs in the chain.
1613 * The intermediate has common name "DemoUnit CA"
1614 * The leaf has a marker extension with OID 1.2.840.113635.100.6.60
1615 @result A policy object. The caller is responsible for calling CFRelease
1616 on this when it is no longer needed.
1618 __nullable CF_RETURNS_RETAINED
1619 SecPolicyRef
SecPolicyCreateDemoDigitalCatalogSigning(void)
1620 __OSX_AVAILABLE(10.13.4) __IOS_AVAILABLE(11.3) __TVOS_AVAILABLE(11.3) __WATCHOS_AVAILABLE(4.3);
1623 @function SecPolicyCreateAppleAssetReceipt
1624 @abstract Returns a policy object for evaluating certificate chains for signing Asset Receipts
1625 @discussion This policy uses the Basic X.509 policy with no validity check
1626 and pinning options:
1627 * The chain is anchored to any of the Apple Root CAs.
1628 * There are exactly 3 certs in the chain.
1629 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.10.
1630 * The leaf has a marker extension with OID 1.2.840.113635.100.6.61.
1631 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1632 @result A policy object. The caller is responsible for calling CFRelease
1633 on this when it is no longer needed.
1635 __nullable CF_RETURNS_RETAINED
1636 SecPolicyRef
SecPolicyCreateAppleAssetReceipt(void)
1637 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
1640 @function SecPolicyCreateAppleDeveloperIDPlustTicket
1641 @abstract Returns a policy object for evaluating certificate chains for signing Developer ID+ Tickets
1642 @discussion This policy uses the Basic X.509 policy with no validity check
1643 and pinning options:
1644 * The chain is anchored to any of the Apple Root CAs.
1645 * There are exactly 3 certs in the chain.
1646 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.17.
1647 * The leaf has a marker extension with OID 1.2.840.113635.100.6.1.30.
1648 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1649 @result A policy object. The caller is responsible for calling CFRelease
1650 on this when it is no longer needed.
1652 __nullable CF_RETURNS_RETAINED
1653 SecPolicyRef
SecPolicyCreateAppleDeveloperIDPlusTicket(void)
1654 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
1657 @function SecPolicyCreateiAPSWAuthWithExpiration
1658 @abstract Returns a policy object for verifying iAP Software Auth certificates
1659 @param checkExpiration Determines whether the policy checks expiration on the certificates
1660 @discussion The resulting policy uses the Basic X.509 policy and pinning options:
1661 * There are exactly 2 certs in the chain.
1662 * The leaf has a marker extension with OID 1.2.840.113635.100.6.59.1
1663 The intended use of this policy is that the caller pass in the
1664 SW Auth root to SecTrustSetAnchorCertificates().
1665 @result A policy object. The caller is responsible for calling CFRelease on this when
1666 it is no longer needed.
1668 __nullable CF_RETURNS_RETAINED
1669 SecPolicyRef
SecPolicyCreateiAPSWAuthWithExpiration(bool checkExpiration
)
1670 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
1673 @function SecPolicyCreateAppleFDRProvisioning
1674 @abstract Returns a policy object for verifying FDR Provisioning certificates
1675 @discussion The resulting policy uses the Basic X.509 policy with no validity check.
1676 The intended use of this policy is that the caller pass in the FDR root to SecTrustSetAnchorCertificates().
1677 @result A policy object. The caller is responsible for calling CFRelease on this when
1678 it is no longer needed.
1680 __nullable CF_RETURNS_RETAINED
1681 SecPolicyRef
SecPolicyCreateAppleFDRProvisioning(void)
1682 API_AVAILABLE(macos(10.14), ios(12.0), watchos(5.0), tvos(12.0));
1685 @function SecPolicyCreateAppleComponentCertificate
1686 @abstract Returns a policy object for verifying Component certs
1687 @param testRootHash Optional; The SHA-256 fingerprint of a test root for pinning.
1688 @discussion The resulting policy uses the Basic X.509 policy with validity check and
1690 * The chain is anchored to the Component Root CA.
1691 * There are exactly 3 certs in the chain.
1692 * The leaf and intermediate each have a marker extension with OID matching 1.2.840.113635.100.11.1
1693 @result A policy object. The caller is responsible for calling CFRelease on this when
1694 it is no longer needed.
1696 __nullable CF_RETURNS_RETAINED
1697 SecPolicyRef
SecPolicyCreateAppleComponentCertificate(CFDataRef __nullable testRootHash
)
1698 API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
1701 @function SecPolicyCreateAppleKeyTransparency
1702 @abstract Returns a policy object for verifying Apple certificates.
1703 @param applicationId A string that identifies the applicationId.
1704 @discussion The resulting policy uses the Basic X.509 policy with no validity check and
1706 * The chain is anchored to any of the Apple Root CAs.
1707 * There are exactly 3 certs in the chain.
1708 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.3".
1709 * The leaf has a marker extension with OID 1.2.840.113635.100.6.69.1 and value
1710 matching the applicationId.
1711 * Revocation is checked via any available method.
1712 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1713 @result A policy object. The caller is responsible for calling CFRelease on this when
1714 it is no longer needed.
1716 __nullable CF_RETURNS_RETAINED
1717 SecPolicyRef
SecPolicyCreateAppleKeyTransparency(CFStringRef applicationId
)
1718 API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
1721 @function SecPolicyCreateLegacySSL
1722 @abstract Returns a policy object for evaluating legacy SSL certificate chains that don't meet
1724 @param server Passing true for this parameter creates a policy for SSL
1725 server certificates.
1726 @param hostname (Optional) If present, the policy will require the specified
1727 hostname to match the hostname in the leaf certificate.
1728 @result A policy object. The caller is responsible for calling CFRelease
1729 on this when it is no longer needed.
1730 @discussion Use of this policy will be audited. Passing false for the server parameter will
1731 result in a SecPolicy object with the same requirements as SecPolicyCreateSSL with a false
1732 server parameter (i.e. the client authentication verification performed by this policy is
1733 identical to the client authentication verification performed by SecPolicyCreateSSL).
1735 __nullable CF_RETURNS_RETAINED
1736 SecPolicyRef
SecPolicyCreateLegacySSL(Boolean server
, CFStringRef __nullable hostname
)
1737 SPI_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
1740 @function SecPolicyCreateAlisha
1741 @abstract Returns a policy object for verifying Alisha certificates.
1742 @discussion The resulting policy uses the Basic X.509 policy with no validity check and
1744 * EC key sizes are P-256 or larger.
1745 @result A policy object. The caller is responsible for calling CFRelease on this when
1746 it is no longer needed.
1748 __nullable CF_RETURNS_RETAINED
1749 SecPolicyRef
SecPolicyCreateAlisha(void)
1750 API_AVAILABLE(macos(10.15.4), ios(13.4), watchos(6.2), tvos(13.4));
1751 extern const CFStringRef kSecPolicyAppleEscrowServiceIdKeySigning
1752 API_AVAILABLE(macos(10.15.6), ios(13.5.5));
1753 extern const CFStringRef kSecPolicyApplePCSEscrowServiceIdKeySigning
1754 API_AVAILABLE(macos(10.15.6), ios(13.5.5));
1757 @function SecPolicyCreateMeasuredBootPolicySigning
1758 @abstract Returns a policy object for verifying Measured Boot Policy Signing certificates.
1759 @discussion The resulting policy uses the Basic X.509 policy with no validity check and
1761 * There are exactly 3 certs in the chain.
1762 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.24.17.
1763 * The leaf has a marker extension with OID 1.2.840.113635.100.6.26.6.1
1764 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1765 Because this policy does not pin the anchors, the caller must use SecTrustSetAnchorCertificates with
1767 @result A policy object. The caller is responsible for calling CFRelease on this when
1768 it is no longer needed.
1770 __nullable CF_RETURNS_RETAINED
1771 SecPolicyRef
SecPolicyCreateMeasuredBootPolicySigning(void)
1772 API_AVAILABLE(macos(10.15.4), ios(13.4), watchos(6.2), tvos(13.4));
1775 @function SecPolicyCreateApplePayQRCodeEncryption
1776 @abstract Returns a policy object for verifying ApplePay QRCode Encryption certificates
1777 @discussion The resulting policy uses the Basic X.509 policy with validity check and
1779 * The root matches the "Apple External EC Root", or on internal builds, "Test Apple External EC Root"
1780 * There are exactly 3 certs in the chain.
1781 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.22.
1782 * The leaf has a marker extension with OID 1.2.840.113635.100.13.3
1783 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1784 * Revocation is checked via any available method
1785 Because the "Apple External" roots are not trusted by default, the caller must use
1786 SecTrustSetAnchorCertificates with the expected roots.
1787 @result A policy object. The caller is responsible for calling CFRelease on this when
1788 it is no longer needed.
1790 __nullable CF_RETURNS_RETAINED
1791 SecPolicyRef
SecPolicyCreateApplePayQRCodeEncryption(void)
1792 API_AVAILABLE(macos(10.16), ios(14.0), watchos(7.0), tvos(14.0));
1795 @function SecPolicyCreateApplePayQRCodeSigning
1796 @abstract Returns a policy object for verifying ApplePay QRCode Signing certificates
1797 @discussion The resulting policy uses the Basic X.509 policy with validity check and
1799 * The root matches the "Apple External EC Root", or on internal builds, "Test Apple External EC Root"
1800 * There are exactly 3 certs in the chain.
1801 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.22.
1802 * The leaf has a marker extension with OID 1.2.840.113635.100.12.12
1803 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1804 * Revocation is checked via any available method
1805 Because the "Apple External" roots are not trusted by default, the caller must use
1806 SecTrustSetAnchorCertificates with the expected roots.
1807 @result A policy object. The caller is responsible for calling CFRelease on this when
1808 it is no longer needed.
1810 __nullable CF_RETURNS_RETAINED
1811 SecPolicyRef
SecPolicyCreateApplePayQRCodeSigning(void)
1812 API_AVAILABLE(macos(10.16), ios(14.0), watchos(7.0), tvos(14.0));
1815 @function SecPolicyCreateAppleAccessoryUpdateSigning
1816 @abstract Returns a policy object for verifying Accessory Firmware Update Signing certificates
1817 @discussion The resulting policy uses the Basic X.509 policy with no validity check and
1819 * The chain is anchored to any of the Apple Root CAs.
1820 * There are exactly 3 certs in the chain.
1821 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.17.
1822 * The leaf has a marker extension with OID 1.2.840.113635.100.12.9, or, if
1823 "AllowAccessoryUpdateSigningBeta" is set to true in the com.apple.security
1824 preference/defaults domain, OID 1.2.840.113635.100.12.10
1825 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1826 * Revocation is checked via any available method
1827 @result A policy object. The caller is responsible for calling CFRelease on this when
1828 it is no longer needed.
1830 __nullable CF_RETURNS_RETAINED
1831 SecPolicyRef
SecPolicyCreateAppleAccessoryUpdateSigning(void)
1832 API_AVAILABLE(macos(10.16), ios(14.0), watchos(7.0), tvos(14.0));
1835 @function SecPolicyCreateAggregateMetricTransparency
1836 @abstract Returns a policy object for verifying Aggregate Metric Transparency certificates
1837 @param facilitator A boolean to indicate whether the facilitator or partner transparency
1838 certificate is being checked.
1839 @discussion The resulting policy uses the Basic X.509 policy with validity check and
1841 * The chain is anchored to any of the Apple Root CAs.
1842 * There are exactly 3 certs in the chain.
1843 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.26.
1844 * The leaf has a marker extension with OID 1.2.840.113635.100.12.17 if facilitator is true or
1845 1.2.840.113635.100.12.18 if facilitator is false. The contents of this marker extension
1847 * Revocation is checked via any available method.
1848 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1849 * Require a positive CT verification result.
1850 @result A policy object. The caller is responsible for calling CFRelease on this when
1851 it is no longer needed.
1853 __nullable CF_RETURNS_RETAINED
1854 SecPolicyRef
SecPolicyCreateAggregateMetricTransparency(bool facilitator
)
1855 API_AVAILABLE(macos(10.15.6), ios(13.6), watchos(6.2), tvos(13.4));
1858 @function SecPolicyCreateAggregateMetricEncryption
1859 @abstract Returns a policy object for verifying Aggregate Metric Encryption certificates
1860 @param facilitator A boolean to indicate whether the facilitator or partner encryption
1861 certificate is being checked.
1862 @discussion The resulting policy uses the Basic X.509 policy with validity check and
1864 * The chain is anchored to any of the Apple Root CAs.
1865 * There are exactly 3 certs in the chain.
1866 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.26.
1867 * The leaf has a marker extension with OID 1.2.840.113635.100.15.2 if facilitator is true or
1868 1.2.840.113635.100.15.3 if facilitator is false.
1869 * Revocation is checked via any available method.
1870 * RSA key sizes are 2048-bit or larger. EC key sizes are P-256 or larger.
1871 * Require a positive CT verification result using the non-TLS CT log list
1872 @result A policy object. The caller is responsible for calling CFRelease on this when
1873 it is no longer needed.
1875 __nullable CF_RETURNS_RETAINED
1876 SecPolicyRef
SecPolicyCreateAggregateMetricEncryption(bool facilitator
)
1877 API_AVAILABLE(macos(11.1), ios(14.3), watchos(7.2), tvos(14.3));
1880 * Legacy functions (OS X only)
1885 @function SecPolicyCopy
1886 @abstract Returns a copy of a policy reference based on certificate type and OID.
1887 @param certificateType A certificate type.
1888 @param policyOID The OID of the policy you want to find. This is a required parameter. See oidsalg.h to see a list of policy OIDs.
1889 @param policy The returned policy reference. This is a required parameter.
1890 @result A result code. See "Security Error Codes" (SecBase.h).
1891 @discussion This function is deprecated in Mac OS X 10.7 and later;
1892 to obtain a policy reference, use one of the SecPolicyCreate* functions in SecPolicy.h.
1894 OSStatus
SecPolicyCopy(CSSM_CERT_TYPE certificateType
, const CSSM_OID
*policyOID
, SecPolicyRef
* __nonnull CF_RETURNS_RETAINED policy
)
1895 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3
, __MAC_10_7
, __IPHONE_NA
, __IPHONE_NA
);
1897 /* Given a unified SecPolicyRef, return a copy with a legacy
1898 C++ ItemImpl-based Policy instance. Only for internal use;
1899 legacy references cannot be used by SecPolicy API functions. */
1900 __nullable CF_RETURNS_RETAINED
1901 SecPolicyRef
SecPolicyCreateItemImplInstance(SecPolicyRef policy
);
1903 /* Given a CSSM_OID pointer, return a string which can be passed
1904 to SecPolicyCreateWithProperties. The return value can be NULL
1905 if no supported policy was found for the OID argument. */
1907 CFStringRef
SecPolicyGetStringForOID(CSSM_OID
* oid
)
1908 API_DEPRECATED("No longer supported", macos(10.5,10.14));
1911 @function SecPolicyCreateAppleTimeStampingAndRevocationPolicies
1912 @abstract Create timeStamping policy array from a given set of policies by applying identical revocation behavior
1913 @param policyOrArray can be a SecPolicyRef or a CFArray of SecPolicyRef
1914 @discussion This function is deprecated in macOS 10.13 and later. Your code should call SecPolicyCreateAppleTimeStamping
1915 and SecPolicyCreateRevocation instead to obtain these policies, then insert them into an array as needed.
1917 __nullable CF_RETURNS_RETAINED
1918 CFArrayRef
SecPolicyCreateAppleTimeStampingAndRevocationPolicies(CFTypeRef policyOrArray
)
1919 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10
, __MAC_10_13
, __IPHONE_NA
, __IPHONE_NA
);
1921 #endif /* TARGET_OS_MAC && !TARGET_OS_IPHONE */
1923 /* MARK: WARNING: The following constants and functions are for project use
1924 * within the Security project and are subject to change without warning */
1927 @enum Policy Check Keys
1928 @discussion Keys that represent various checks that can be done in a trust
1929 policy. Use outside of the Security project at your own peril.
1931 extern const CFStringRef kSecPolicyCheckAnchorApple
;
1932 extern const CFStringRef kSecPolicyCheckAnchorSHA256
;
1933 extern const CFStringRef kSecPolicyCheckAnchorTrusted
;
1934 extern const CFStringRef kSecPolicyCheckBasicCertificateProcessing
;
1935 extern const CFStringRef kSecPolicyCheckBasicConstraints
;
1936 extern const CFStringRef kSecPolicyCheckBasicConstraintsCA
;
1937 extern const CFStringRef kSecPolicyCheckBasicConstraintsPathLen
;
1938 extern const CFStringRef kSecPolicyCheckBlackListedKey
;
1939 extern const CFStringRef kSecPolicyCheckBlackListedLeaf
;
1940 extern const CFStringRef kSecPolicyCheckCertificatePolicy
;
1941 extern const CFStringRef kSecPolicyCheckChainLength
;
1942 extern const CFStringRef kSecPolicyCheckCriticalExtensions
;
1943 extern const CFStringRef kSecPolicyCheckCTRequired
;
1944 extern const CFStringRef kSecPolicyCheckEAPTrustedServerNames
;
1945 extern const CFStringRef kSecPolicyCheckEmail
;
1946 extern const CFStringRef kSecPolicyCheckExtendedKeyUsage
;
1947 extern const CFStringRef kSecPolicyCheckExtendedValidation
;
1948 extern const CFStringRef kSecPolicyCheckGrayListedKey
;
1949 extern const CFStringRef kSecPolicyCheckGrayListedLeaf
;
1950 extern const CFStringRef kSecPolicyCheckLeafSPKISHA256
;
1951 extern const CFStringRef kSecPolicyCheckIdLinkage
;
1952 extern const CFStringRef kSecPolicyCheckIntermediateCountry
;
1953 extern const CFStringRef kSecPolicyCheckIntermediateEKU
;
1954 extern const CFStringRef kSecPolicyCheckIntermediateMarkerOid
;
1955 extern const CFStringRef kSecPolicyCheckIntermediateMarkerOidWithoutValueCheck
;
1956 extern const CFStringRef kSecPolicyCheckIntermediateOrganization
;
1957 extern const CFStringRef kSecPolicyCheckIntermediateSPKISHA256
;
1958 extern const CFStringRef kSecPolicyCheckCAspkiSHA256
;
1959 extern const CFStringRef kSecPolicyCheckIssuerCommonName
;
1960 extern const CFStringRef kSecPolicyCheckIssuerPolicyConstraints
;
1961 extern const CFStringRef kSecPolicyCheckIssuerNameConstraints
;
1962 extern const CFStringRef kSecPolicyCheckKeySize
;
1963 extern const CFStringRef kSecPolicyCheckKeyUsage
;
1964 extern const CFStringRef kSecPolicyCheckLeafMarkerOid
;
1965 extern const CFStringRef kSecPolicyCheckLeafMarkerOidWithoutValueCheck
;
1966 extern const CFStringRef kSecPolicyCheckLeafMarkersProdAndQA
;
1967 extern const CFStringRef kSecPolicyCheckMissingIntermediate
;
1968 extern const CFStringRef kSecPolicyCheckNameConstraints
;
1969 extern const CFStringRef kSecPolicyCheckNoNetworkAccess
;
1970 extern const CFStringRef kSecPolicyCheckNonEmptySubject
;
1971 extern const CFStringRef kSecPolicyCheckNonTlsCTRequired
;
1972 extern const CFStringRef kSecPolicyCheckNotCA
;
1973 extern const CFStringRef kSecPolicyCheckNotValidBefore
;
1974 extern const CFStringRef kSecPolicyCheckPinningRequired
;
1975 extern const CFStringRef kSecPolicyCheckPolicyConstraints
;
1976 extern const CFStringRef kSecPolicyCheckRevocation
;
1977 extern const CFStringRef kSecPolicyCheckRevocationIfTrusted
;
1978 extern const CFStringRef kSecPolicyCheckRevocationOnline
;
1979 extern const CFStringRef kSecPolicyCheckRevocationResponseRequired
;
1980 extern const CFStringRef kSecPolicyCheckSSLHostname
;
1981 extern const CFStringRef kSecPolicyCheckServerAuthEKU
;
1982 extern const CFStringRef kSecPolicyCheckSignatureHashAlgorithms
;
1983 extern const CFStringRef kSecPolicyCheckSubjectCommonName
;
1984 extern const CFStringRef kSecPolicyCheckSubjectCommonNamePrefix
;
1985 extern const CFStringRef kSecPolicyCheckSubjectCommonNameTEST
;
1986 extern const CFStringRef kSecPolicyCheckSubjectOrganization
;
1987 extern const CFStringRef kSecPolicyCheckSubjectOrganizationalUnit
;
1988 extern const CFStringRef kSecPolicyCheckSystemTrustedCTRequired
;
1989 extern const CFStringRef kSecPolicyCheckSystemTrustedWeakHash
;
1990 extern const CFStringRef kSecPolicyCheckSystemTrustedWeakKey
;
1991 extern const CFStringRef kSecPolicyCheckTemporalValidity
;
1992 extern const CFStringRef kSecPolicyCheckUnparseableExtension
;
1993 extern const CFStringRef kSecPolicyCheckUsageConstraints
;
1994 extern const CFStringRef kSecPolicyCheckValidityPeriodMaximums
;
1995 extern const CFStringRef kSecPolicyCheckValidRoot
;
1996 extern const CFStringRef kSecPolicyCheckWeakKeySize
;
1997 extern const CFStringRef kSecPolicyCheckWeakSignature
;
1999 /* Special option for checking Apple Anchors */
2000 extern const CFStringRef kSecPolicyAppleAnchorIncludeTestRoots
;
2002 /* Special option for checking Prod and QA Markers */
2003 extern const CFStringRef kSecPolicyLeafMarkerProd
;
2004 extern const CFStringRef kSecPolicyLeafMarkerQA
;
2006 /* Special option for checking Revocation */
2007 extern const CFStringRef kSecPolicyCheckRevocationOCSP
;
2008 extern const CFStringRef kSecPolicyCheckRevocationCRL
;
2009 extern const CFStringRef kSecPolicyCheckRevocationAny
;
2012 extern const CFStringRef kSecPolicyNameX509Basic
;
2013 extern const CFStringRef kSecPolicyNameSSLServer
;
2014 extern const CFStringRef kSecPolicyNameSSLClient
;
2015 extern const CFStringRef kSecPolicyNameEAPServer
;
2016 extern const CFStringRef kSecPolicyNameEAPClient
;
2017 extern const CFStringRef kSecPolicyNameIPSecServer
;
2018 extern const CFStringRef kSecPolicyNameIPSecClient
;
2019 extern const CFStringRef kSecPolicyNameSMIME
;
2020 extern const CFStringRef kSecPolicyNameCodeSigning
;
2021 extern const CFStringRef kSecPolicyNameTimeStamping
;
2022 extern const CFStringRef kSecPolicyNameOCSPSigner
;
2025 @function SecPolicyCreateEscrowServiceIdKeySigning
2026 @abstract Returns a policy object for verifying Escrow Service ID keys.
2027 @discussion The resulting policy uses the Basic X.509 policy with no validity check and
2029 * The chain is anchored to the current Escrow Roots in the OTAPKI asset.
2030 * There are exactly 2 certs in the chain.
2031 * The leaf has KeyUsage with the DigitalSignature bit set.
2032 * CN matching the name generated by escrow service.
2033 @result A policy object. The caller is responsible for calling CFRelease on this when
2034 it is no longer needed.
2036 __nullable CF_RETURNS_RETAINED
2037 SecPolicyRef
SecPolicyCreateEscrowServiceIdKeySigning(void)
2038 API_AVAILABLE(macos(10.15.6), ios(13.6));
2041 @function SecPolicyCreatePCSEscrowServiceIdKeySigning
2042 @abstract Returns a policy object for verifying PCS Escrow Service ID keys.
2043 @discussion The resulting policy uses the Basic X.509 policy with no validity check and
2045 * The chain is anchored to the current Escrow Roots in the OTAPKI asset.
2046 * There are exactly 2 certs in the chain.
2047 * The leaf has KeyUsage with the DigitalSignature bit set.
2048 * CN matching the name generated by escrow service.
2049 @result A policy object. The caller is responsible for calling CFRelease on this when
2050 it is no longer needed.
2052 __nullable CF_RETURNS_RETAINED
2053 SecPolicyRef
SecPolicyCreatePCSEscrowServiceIdKeySigning(void)
2054 API_AVAILABLE(macos(10.15.6), ios(13.6));
2057 * MARK: SecPolicyCheckCert functions
2059 bool SecPolicyCheckCertSSLHostname(SecCertificateRef cert
, CFTypeRef pvcValue
);
2060 bool SecPolicyCheckCertEmail(SecCertificateRef cert
, CFTypeRef pvcValue
);
2061 bool SecPolicyCheckCertTemporalValidity(SecCertificateRef cert
, CFTypeRef pvcValue
);
2062 bool SecPolicyCheckCertWeakKeySize(SecCertificateRef cert
, CFTypeRef __nullable pvcValue
);
2063 bool SecPolicyCheckCertKeyUsage(SecCertificateRef cert
, CFTypeRef pvcValue
);
2064 bool SecPolicyCheckCertExtendedKeyUsage(SecCertificateRef cert
, CFTypeRef pvcValue
);
2065 bool SecPolicyCheckCertSubjectCommonName(SecCertificateRef cert
, CFTypeRef pvcValue
);
2066 bool SecPolicyCheckCertSubjectCommonNamePrefix(SecCertificateRef cert
, CFTypeRef pvcValue
);
2067 bool SecPolicyCheckCertSubjectCommonNameTEST(SecCertificateRef cert
, CFTypeRef pvcValue
);
2068 bool SecPolicyCheckCertSubjectOrganization(SecCertificateRef cert
, CFTypeRef pvcValue
);
2069 bool SecPolicyCheckCertSubjectOrganizationalUnit(SecCertificateRef cert
, CFTypeRef pvcValue
);
2070 bool SecPolicyCheckCertNotValidBefore(SecCertificateRef cert
, CFTypeRef pvcValue
);
2071 bool SecPolicyCheckCertEAPTrustedServerNames(SecCertificateRef cert
, CFTypeRef pvcValue
);
2072 bool SecPolicyCheckCertLeafMarkerOid(SecCertificateRef cert
, CFTypeRef pvcValue
);
2073 bool SecPolicyCheckCertLeafMarkerOidWithoutValueCheck(SecCertificateRef cert
, CFTypeRef pvcValue
);
2074 bool SecPolicyCheckCertLeafMarkersProdAndQA(SecCertificateRef cert
, CFTypeRef pvcValue
);
2075 bool SecPolicyCheckCertNonEmptySubject(SecCertificateRef cert
, CFTypeRef __nullable pvcValue
);
2076 bool SecPolicyCheckCertKeySize(SecCertificateRef cert
, CFTypeRef pvcValue
);
2077 bool SecPolicyCheckCertWeakSignature(SecCertificateRef cert
, CFTypeRef __nullable pvcValue
);
2078 bool SecPolicyCheckCertSignatureHashAlgorithms(SecCertificateRef cert
, CFTypeRef pvcValue
);
2079 bool SecPolicyCheckCertCertificatePolicy(SecCertificateRef cert
, CFTypeRef pvcValue
);
2080 bool SecPolicyCheckCertCriticalExtensions(SecCertificateRef cert
, CFTypeRef __nullable pvcValue
);
2081 bool SecPolicyCheckCertSubjectCountry(SecCertificateRef cert
, CFTypeRef pvcValue
);
2082 bool SecPolicyCheckCertUnparseableExtension(SecCertificateRef cert
, CFTypeRef pvcValue
);
2083 bool SecPolicyCheckCertNotCA(SecCertificateRef cert
, CFTypeRef pvcValue
);
2085 void SecPolicySetName(SecPolicyRef policy
, CFStringRef policyName
);
2086 __nullable CFArrayRef
SecPolicyXPCArrayCopyArray(xpc_object_t xpc_policies
, CFErrorRef
*error
);
2088 void SecPolicySetOptionsValue(SecPolicyRef policy
, CFStringRef key
, CFTypeRef value
);
2090 bool SecDNSIsTLD(CFStringRef reference
);
2092 CFDataRef
CreateCFDataFromBase64CFString(CFStringRef base64string
);
2093 CFArrayRef
parseNSPinnedDomains(CFDictionaryRef nsPinnedDomainsDict
, CFStringRef hostName
, CFStringRef nsPinnedIdentityType
);
2094 void SecPolicyReconcilePinningRequiredIfInfoSpecified(CFMutableDictionaryRef options
);
2096 CF_IMPLICIT_BRIDGING_DISABLED
2097 CF_ASSUME_NONNULL_END
2101 #endif /* !_SECURITY_SECPOLICYPRIV_H_ */