2 * Copyright (c) 2007-2015 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/SecPolicy.h>
34 #include <Security/SecCertificate.h>
35 #include <CoreFoundation/CFArray.h>
36 #include <CoreFoundation/CFString.h>
37 #include <Availability.h>
42 @enum Policy Constants (Private)
43 @discussion Predefined constants used to specify a policy.
44 @constant kSecPolicyApplePassbookSigning
45 @constant kSecPolicyAppleMobileStore
46 @constant kSecPolicyAppleTestMobileStore
47 @constant kSecPolicyAppleEscrowService
48 @constant kSecPolicyAppleProfileSigner
49 @constant kSecPolicyAppleQAProfileSigner
50 @constant kSecPolicyAppleServerAuthentication
51 @constant kSecPolicyAppleOTAPKISigner
52 @constant kSecPolicyAppleTestOTAPKISigner
53 @constant kSecPolicyAppleIDValidationRecordSigning
54 @constant kSecPolicyAppleSMPEncryption
55 @constant kSecPolicyAppleTestSMPEncryption
56 @constant kSecPolicyApplePCSEscrowService
57 @constant kSecPolicyAppleSWUpdateSigning
58 @constant kSecPolicyApplePackageSigning
59 @constant kSecPolicyAppleATVAppSigning
60 @constant kSecPolicyAppleTestATVAppSigning
61 @constant kSecPolicyAppleOSXProvisioningProfileSigning
63 extern const CFStringRef kSecPolicyApplePassbookSigning
64 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
65 extern const CFStringRef kSecPolicyAppleMobileStore
66 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
67 extern const CFStringRef kSecPolicyAppleTestMobileStore
68 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
69 extern const CFStringRef kSecPolicyAppleEscrowService
70 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
71 extern const CFStringRef kSecPolicyAppleProfileSigner
72 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
73 extern const CFStringRef kSecPolicyAppleQAProfileSigner
74 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
75 extern const CFStringRef kSecPolicyAppleServerAuthentication
76 __OSX_AVAILABLE_STARTING(__MAC_10_10
, __IPHONE_8_0
);
78 extern const CFStringRef kSecPolicyAppleOTAPKISigner
79 __OSX_AVAILABLE_STARTING(__MAC_NA
, __IPHONE_7_0
);
80 extern const CFStringRef kSecPolicyAppleTestOTAPKISigner
81 __OSX_AVAILABLE_STARTING(__MAC_NA
, __IPHONE_7_0
);
82 extern const CFStringRef kSecPolicyAppleIDValidationRecordSigningPolicy
83 __OSX_AVAILABLE_STARTING(__MAC_NA
, __IPHONE_7_0
);
84 extern const CFStringRef kSecPolicyAppleSMPEncryption
85 __OSX_AVAILABLE_STARTING(__MAC_NA
, __IPHONE_8_0
);
86 extern const CFStringRef kSecPolicyAppleTestSMPEncryption
87 __OSX_AVAILABLE_STARTING(__MAC_NA
, __IPHONE_8_0
);
89 extern const CFStringRef kSecPolicyApplePCSEscrowService
90 __OSX_AVAILABLE_STARTING(__MAC_10_10
, __IPHONE_7_0
);
91 extern const CFStringRef kSecPolicyAppleSWUpdateSigning
92 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
93 extern const CFStringRef kSecPolicyApplePackageSigning
94 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
95 extern const CFStringRef kSecPolicyAppleATVAppSigning
96 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
97 extern const CFStringRef kSecPolicyAppleTestATVAppSigning
98 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
99 extern const CFStringRef kSecPolicyAppleOSXProvisioningProfileSigning
100 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
101 extern const CFStringRef kSecPolicyAppleAST2DiagnosticsServerAuth
102 __OSX_AVAILABLE_STARTING(__MAC_10_11_4
, __IPHONE_9_3
);
106 @enum Policy Value Constants
107 @abstract Predefined property key constants used to get or set values in
108 a dictionary for a policy instance.
109 @constant kSecPolicyTeamIdentifier Specifies a CFStringRef containing a
110 team identifier which must be matched in the certificate to satisfy
111 this policy. For the Passbook signing policy, this string must match
112 the Organizational Unit field of the certificate subject.
114 extern const CFStringRef kSecPolicyTeamIdentifier
115 __OSX_AVAILABLE_STARTING(__MAC_10_9
, __IPHONE_7_0
);
118 @function SecPolicyCreateiPhoneActivation
119 @abstract Returns a policy object for verifying iPhone Activation
121 @discussion This policy is like the Basic X.509 policy with the additional
122 requirements that the chain must contain exactly three certificates, the
123 anchor is the Apple Inc. CA, and the subject of the first intermediate
124 certificate has "Apple iPhone Certification Authority" as its only
126 @result A policy object. The caller is responsible for calling CFRelease
127 on this when it is no longer needed.
129 SecPolicyRef
SecPolicyCreateiPhoneActivation(void);
132 @function SecPolicyCreateiPhoneDeviceCertificate
133 @abstract Returns a policy object for verifying iPhone Device certificate
135 @discussion This policy is like the Basic X.509 policy with the additional
136 requirements that the chain must contain exactly four certificates, the
137 anchor is the Apple Inc. CA, and the subject of the first intermediate
138 certificate has "Apple iPhone Device CA" as its only Common Name entry.
139 @result A policy object. The caller is responsible for calling CFRelease
140 on this when it is no longer needed.
142 SecPolicyRef
SecPolicyCreateiPhoneDeviceCertificate(void);
145 @function SecPolicyCreateFactoryDeviceCertificate
146 @abstract Returns a policy object for verifying Factory Device certificate
148 @discussion This policy is like the Basic X.509 policy with the additional
149 requirements that the chain must be anchored to the factory device certificate
151 @result A policy object. The caller is responsible for calling CFRelease
152 on this when it is no longer needed.
154 SecPolicyRef
SecPolicyCreateFactoryDeviceCertificate(void);
157 @function SecPolicyCreateiAP
158 @abstract Returns a policy object for verifying iAP certificate chains.
159 @discussion This policy is like the Basic X.509 policy with these
160 additional requirements:
161 * The leaf's NotValidBefore should be greater than 5/31/06 midnight GMT.
162 * The Common Name of the leaf begins with the characters "IPA_".
163 * No validity checking is performed for any of the certificates.
164 The intended use of this policy is that the caller pass in the
165 intermediates for iAP1 and iAP2 to SecTrustSetAnchorCertificates().
166 @result A policy object. The caller is responsible for calling CFRelease
167 on this when it is no longer needed.
169 SecPolicyRef
SecPolicyCreateiAP(void);
172 @function SecPolicyCreateiTunesStoreURLBag
173 @abstract Returns a policy object for verifying iTunes Store URL bag
175 @discussion This policy is like the Basic X.509 policy with these
176 additional requirements:
177 * The leaf's Organization is Apple Inc.
178 * The Common Name of the leaf is "iTunes Store URL Bag".
179 @result A policy object. The caller is responsible for calling CFRelease
180 on this when it is no longer needed.
182 SecPolicyRef
SecPolicyCreateiTunesStoreURLBag(void);
185 @function SecPolicyCreateEAP
186 @abstract Returns a policy object for verifying for 802.1x/EAP certificates.
187 @param server Passing true for this parameter create a policy for EAP
189 @param trustedServerNames Optional; if present, the hostname in the leaf
190 certificate must be in the trustedServerNames list. Note that contrary
191 to all other policies the trustedServerNames list entries can have wildcards
192 whilst the certificate cannot. This matches the existing deployments.
193 @result A policy object. The caller is responsible for calling CFRelease
194 on this when it is no longer needed.
196 SecPolicyRef
SecPolicyCreateEAP(Boolean server
, CFArrayRef trustedServerNames
);
199 @function SecPolicyCreateIPSec
200 @abstract Returns a policy object for evaluating IPSec certificate chains.
201 @param server Passing true for this parameter create a policy for IPSec
203 @param hostname Optional; if present, the policy will require the specified
204 hostname or ip address to match the hostname in the leaf certificate.
205 @result A policy object. The caller is responsible for calling CFRelease
206 on this when it is no longer needed.
208 SecPolicyRef
SecPolicyCreateIPSec(Boolean server
, CFStringRef hostname
);
211 @function SecPolicyCreateAppleSWUpdateSigning
212 @abstract Returned a policy object for evaluating SW update signing certs.
213 @result A policy object. The caller is responsible for calling CFRelease
214 on this when it is no longer needed.
216 SecPolicyRef
SecPolicyCreateAppleSWUpdateSigning(void);
219 @function SecPolicyCreateApplePackageSigning
220 @abstract Returned a policy object for evaluating installer package signing certs.
221 @result A policy object. The caller is responsible for calling CFRelease
222 on this when it is no longer needed.
224 SecPolicyRef
SecPolicyCreateApplePackageSigning(void);
227 @function SecPolicyCreateiPhoneApplicationSigning
228 @abstract Returns a policy object for evaluating signed application
229 signatures. This is for apps signed directly by the app store.
230 @result A policy object. The caller is responsible for calling CFRelease
231 on this when it is no longer needed.
233 SecPolicyRef
SecPolicyCreateiPhoneApplicationSigning(void);
236 @function SecPolicyCreateiPhoneProfileApplicationSigning
237 @abstract Returns a policy object for evaluating signed application
238 signatures. This is meant for certificates inside a UPP or regular
239 profile. Currently it only checks for experation of the leaf and
241 @result A policy object. The caller is responsible for calling CFRelease
242 on this when it is no longer needed.
244 SecPolicyRef
SecPolicyCreateiPhoneProfileApplicationSigning(void);
247 @function SecPolicyCreateiPhoneProvisioningProfileSigning
248 @abstract Returns a policy object for evaluating provisioning profile signatures.
249 @result A policy object. The caller is responsible for calling CFRelease
250 on this when it is no longer needed.
252 SecPolicyRef
SecPolicyCreateiPhoneProvisioningProfileSigning(void);
255 @function SecPolicyCreateAppleTVOSApplicationSigning
256 @abstract Returns a policy object for evaluating signed application
257 signatures. This is for apps signed directly by the Apple TV app store,
258 and allows for both the prod and the dev/test certs.
259 @result A policy object. The caller is responsible for calling CFRelease
260 on this when it is no longer needed.
262 SecPolicyRef
SecPolicyCreateAppleTVOSApplicationSigning(void);
265 @function SecPolicyCreateOCSPSigner
266 @abstract Returns a policy object for evaluating ocsp response signers.
267 @result A policy object. The caller is responsible for calling CFRelease
268 on this when it is no longer needed.
270 SecPolicyRef
SecPolicyCreateOCSPSigner(void);
274 kSecSignSMIMEUsage
= (1 << 0),
275 kSecKeyEncryptSMIMEUsage
= (1 << 1),
276 kSecDataEncryptSMIMEUsage
= (1 << 2),
277 kSecKeyExchangeDecryptSMIMEUsage
= (1 << 3),
278 kSecKeyExchangeEncryptSMIMEUsage
= (1 << 4),
279 kSecKeyExchangeBothSMIMEUsage
= (1 << 5),
280 kSecAnyEncryptSMIME
= kSecKeyEncryptSMIMEUsage
| kSecDataEncryptSMIMEUsage
|
281 kSecKeyExchangeDecryptSMIMEUsage
| kSecKeyExchangeEncryptSMIMEUsage
285 @function SecPolicyCreateSMIME
286 @abstract Returns a policy object for evaluating S/MIME certificate chains.
287 @param smimeUsage Pass the bitwise or of one or more kSecXXXSMIMEUsage
288 flags, to indicated the intended usage of this certificate. A certificate which allows
289 @param email Optional; if present, the policy will require the specified
290 email to match the email in the leaf certificate.
291 @result A policy object. The caller is responsible for calling CFRelease
292 on this when it is no longer needed.
294 SecPolicyRef
SecPolicyCreateSMIME(CFIndex smimeUsage
, CFStringRef email
);
297 @function SecPolicyCreateCodeSigning
298 @abstract Returns a policy object for evaluating code signing certificate chains.
299 @result A policy object. The caller is responsible for calling CFRelease
300 on this when it is no longer needed.
302 SecPolicyRef
SecPolicyCreateCodeSigning(void);
305 @function SecPolicyCreateLockdownPairing
306 @abstract basic x509 policy for checking lockdown pairing certificate chains.
307 It explicitly allows for empty subjects
309 SecPolicyRef
SecPolicyCreateLockdownPairing(void);
312 @function SecPolicyCreateURLBag
313 @abstract check for private CA, eku codesigning and certificate policy that
314 pertains to signing of URL bags.
316 SecPolicyRef
SecPolicyCreateURLBag(void);
319 @function SecPolicyCreateOTATasking
320 @abstract check for 3 long chain through Apple Certification Policy with common name
323 SecPolicyRef
SecPolicyCreateOTATasking(void);
326 @function SecPolicyCreateMobileAsset
327 @abstract check for 3 long chain through Apple Certification Policy with common name
328 "Asset Manifest Signing".
330 SecPolicyRef
SecPolicyCreateMobileAsset(void);
333 @function SecPolicyCreateAppleIDAuthorityPolicy
334 @abstract check for an Apple ID identity per marker in the leaf and marker in the intermediate, rooted in the Apple CA.
336 SecPolicyRef
SecPolicyCreateAppleIDAuthorityPolicy(void);
339 @function SecPolicyCreateMacAppStoreReceipt
340 @abstract check for valid Mac App Store receipt signing certificate chain
342 SecPolicyRef
SecPolicyCreateMacAppStoreReceipt(void);
345 @function SecPolicyCreatePassbookCardSigner
346 @abstract check rooted in the Apple CA, eku passbook, marker passbook and name matching
347 @param cardIssuer Required; must match name in marker extension.
348 @param teamIdentifier Optional; if present, the policy will require the specified
349 team ID to match the organizationalUnit field in the leaf certificate's subject.
350 @result A policy object. The caller is responsible for calling CFRelease
351 on this when it is no longer needed.
353 SecPolicyRef
SecPolicyCreatePassbookCardSigner(CFStringRef cardIssuer
,
354 CFStringRef teamIdentifier
);
357 @function SecPolicyCreateMobileStoreSigner
358 @abstract Check for key usage of digital signature,
359 check for 3 long chain through Apple System Integration 2 Certification Authority
360 with a certificate policy OID of 1.2.840.113635.100.5.12 that roots to the
363 SecPolicyRef
SecPolicyCreateMobileStoreSigner(void);
366 @function SecPolicyCreateTestMobileStoreSigner
367 @abstract Check for key usage of digital signature,
368 check for 3 long chain through Apple System Integration 2 Certification Authority
369 with a certificate policy OID of 1.2.840.113635.100.5.12.1 that roots to the
372 SecPolicyRef
SecPolicyCreateTestMobileStoreSigner(void);
375 @function SecPolicyCreateEscrowServiceSigner
376 @abstract Check for key usage of digital signature, has a leaf marker OID of
377 1.2.840.113635.100.6.23.1 and roots to the production Escrow Root
379 SecPolicyRef
SecPolicyCreateEscrowServiceSigner(void);
382 @function SecPolicyCreatePCSEscrowServiceSigner
383 @abstract Check for key usage of digital signature, has a leaf marker OID of
384 1.2.840.113635.100.6.23.1 and roots to the production PCS Escrow Root
386 SecPolicyRef
SecPolicyCreatePCSEscrowServiceSigner(void);
389 @function SecPolicyCopyEscrowRootCertificate
390 @abstract Return back the Root certificate for the Escrow service
392 SecCertificateRef
SecPolicyCopyEscrowRootCertificate(void);
395 @function SecPolicyCreateOSXProvisioningProfileSigning
396 @abstract Check for leaf marker OID 1.2.840.113635.100.4.11,
397 intermediate marker OID 1.2.840.113635.100.6.2.1,
398 chains to Apple Root CA
400 SecPolicyRef
SecPolicyCreateOSXProvisioningProfileSigning(void);
403 @function SecPolicyCreateConfigurationProfileSigner
404 @abstract Check for key usage of digital signature, has a EKU OID of
405 1.2.840.113635.100.4.16 and
406 roots to Apple Application Integration 2 Certification Authority
408 SecPolicyRef
SecPolicyCreateConfigurationProfileSigner(void);
411 @function SecPolicyCreateQAConfigurationProfileSigner
412 @abstract Check for key usage of digital signature, has a EKU OID of
413 1.2.840.113635.100.4.17 and
414 roots to Apple Application Integration 2 Certification Authority
416 SecPolicyRef
SecPolicyCreateQAConfigurationProfileSigner(void);
419 @function SecPolicyCreateOTAPKISigner
420 @abstract Check for key usage of digital signature, and
421 roots to Apple PKI Settings Root Certification Authority
423 SecPolicyRef
SecPolicyCreateOTAPKISigner(void);
426 @function SecPolicyCreateTestOTAPKISigner
427 @abstract Check for key usage of digital signature, and
428 roots to Apple PKI Settings Root - TESTING
430 SecPolicyRef
SecPolicyCreateTestOTAPKISigner(void);
433 @function SecPolicyCreateAppleIDValidationRecordSigningPolicy
434 @abstract Check for leaf certificate contains the
435 appleIDValidationRecordSigning (1 2 840 113635 100 6 25), and
436 intermediate certificate contains
437 appleCertificateExtensionApplicationIntegrationIntermediate
438 (1 2 840 113635 100 6 2 3) and
439 appleCertificateExtensionSystemIntegration2Intermediate
440 (1 2 840 113635 100 6 2 10) and roots to the Apple root
442 SecPolicyRef
SecPolicyCreateAppleIDValidationRecordSigningPolicy(void);
445 @function SecPolicyCreateAppleSMPEncryption
446 @abstract Check for intermediate certificate 'Apple System Integration CA - ECC' by name,
447 and root certificate 'Apple Root CA - ECC' by hash.
448 Leaf cert must have Key Encipherment usage. Other checks TBD.
450 SecPolicyRef
SecPolicyCreateAppleSMPEncryption(void);
453 @function SecPolicyCreateTestAppleSMPEncryption
454 @abstract Check for intermediate certificate 'Test Apple System Integration CA - ECC' by name,
455 and root certificate 'Test Apple Root CA - ECC' by hash.
456 Leaf cert must have Key Encipherment usage. Other checks TBD.
458 SecPolicyRef
SecPolicyCreateTestAppleSMPEncryption(void);
461 @function SecPolicyCreateApplePPQSigning
462 @abstract Check for intermediate certificate 'Apple System Integration 2 Certification Authority' by name,
464 Leaf cert must have Digital Signature usage.
465 Leaf cert must have Apple PPQ Signing marker OID (1.2.840.113635.100.6.38.2).
466 Intermediate must have marker OID (1.2.840.113635.100.6.2.10).
468 SecPolicyRef
SecPolicyCreateApplePPQSigning(void);
471 @function SecPolicyCreateTestApplePPQSigning
472 @abstract Check for intermediate certificate 'Apple System Integration 2 Certification Authority' by name,
474 Leaf cert must have Digital Signature usage.
475 Leaf cert must have Apple PPQ Signing Test marker OID (1.2.840.113635.100.6.38.1).
476 Intermediate must have marker OID (1.2.840.113635.100.6.2.10).
478 SecPolicyRef
SecPolicyCreateTestApplePPQSigning(void);
481 @function SecPolicyCreateAppleIDSService
482 @abstract Ensure we're appropriately pinned to the IDS service (SSL + Apple restrictions)
484 SecPolicyRef
SecPolicyCreateAppleIDSService(CFStringRef hostname
);
487 @function SecPolicyCreateAppleIDSServiceContext
488 @abstract Ensure we're appropriately pinned to the IDS service (SSL + Apple restrictions)
490 SecPolicyRef
SecPolicyCreateAppleIDSServiceContext(CFStringRef hostname
, CFDictionaryRef context
);
493 @function SecPolicyCreateApplePushService
494 @abstract Ensure we're appropriately pinned to the Push service (SSL + Apple restrictions)
496 SecPolicyRef
SecPolicyCreateApplePushService(CFStringRef hostname
, CFDictionaryRef context
);
499 @function SecPolicyCreateApplePushServiceLegacy
500 @abstract Ensure we're appropriately pinned to the Push service (via Entrust)
502 SecPolicyRef
SecPolicyCreateApplePushServiceLegacy(CFStringRef hostname
);
505 @function SecPolicyCreateAppleMMCSService
506 @abstract Ensure we're appropriately pinned to the MMCS service (SSL + Apple restrictions)
508 SecPolicyRef
SecPolicyCreateAppleMMCSService(CFStringRef hostname
, CFDictionaryRef context
);
511 @function SecPolicyCreateAppleGSService
512 @abstract Ensure we're appropriately pinned to the GS service (SSL + Apple restrictions)
514 SecPolicyRef
SecPolicyCreateAppleGSService(CFStringRef hostname
, CFDictionaryRef context
)
515 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
518 @function SecPolicyCreateApplePPQService
519 @abstract Ensure we're appropriately pinned to the PPQ service (SSL + Apple restrictions)
521 SecPolicyRef
SecPolicyCreateApplePPQService(CFStringRef hostname
, CFDictionaryRef context
)
522 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
525 @function SecPolicyCreateAppleAST2Service
526 @abstract Ensure we're appropriately pinned to the AST2 Diagnostic service (SSL + Apple restrictions)
528 SecPolicyRef
SecPolicyCreateAppleAST2Service(CFStringRef hostname
, CFDictionaryRef context
)
529 __OSX_AVAILABLE_STARTING(__MAC_10_11_4
, __IPHONE_9_3
);
532 @function SecPolicyCreateAppleSSLService
533 @abstract Ensure we're appropriately pinned to an Apple server (SSL + Apple restrictions)
535 SecPolicyRef
SecPolicyCreateAppleSSLService(CFStringRef hostname
);
538 @function SecPolicyCreateAppleTimeStamping
539 @abstract Check for RFC3161 timestamping EKU.
541 SecPolicyRef
SecPolicyCreateAppleTimeStamping(void);
544 @function SecPolicyCreateAppleATVAppSigning
545 @abstract Check for intermediate certificate 'Apple Worldwide Developer Relations Certification Authority' by name,
547 Leaf cert must have Digital Signature usage.
548 Leaf cert must have Apple ATV App Signing marker OID (1.2.840.113635.100.6.1.24).
549 Leaf cert must have 'Apple TVOS Application Signing' common name.
551 SecPolicyRef
SecPolicyCreateAppleATVAppSigning(void)
552 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
555 @function SecPolicyCreateTestAppleATVAppSigning
556 @abstract Check for intermediate certificate 'Apple Worldwide Developer Relations Certification Authority' by name,
558 Leaf cert must have Digital Signature usage.
559 Leaf cert must have Apple ATV App Signing Test marker OID (1.2.840.113635.100.6.1.24.1).
560 Leaf cert must have 'TEST Apple TVOS Application Signing TEST' common name.
562 SecPolicyRef
SecPolicyCreateTestAppleATVAppSigning(void)
563 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
567 @function SecPolicyCreateApplePayIssuerEncryption
568 @abstract Check for intermediate certificate 'Apple Worldwide Developer Relations CA - G2' by name,
570 Leaf cert must have Key Encipherment and Key Agreement usage.
571 Leaf cert must have Apple Pay Issuer Encryption marker OID (1.2.840.113635.100.6.39).
573 SecPolicyRef
SecPolicyCreateApplePayIssuerEncryption(void)
574 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
578 @function SecPolicyCreateAppleATVVPNProfileSigning
579 @abstract Check for leaf marker OID 1.2.840.113635.100.6.43,
580 intermediate marker OID 1.2.840.113635.100.6.2.10,
581 chains to Apple Root CA, path length 3
583 SecPolicyRef
SecPolicyCreateAppleATVVPNProfileSigning(void)
584 __OSX_AVAILABLE_STARTING(__MAC_10_11
, __IPHONE_9_0
);
587 @function SecPolicyCreateAppleHomeKitServerAuth
588 @abstract Ensure we're appropriately pinned to the HomeKit service (SSL + Apple restrictions)
589 @param hostname Required; hostname to verify the certificate name against.
590 @discussion This policy uses the Basic X.509 policy with validity check
592 * The chain is anchored to any of the production Apple Root CAs via full certificate
593 comparison. Test Apple Root CAs are permitted only on internal releases with defaults write.
594 * The intermediate has a marker extension with OID 1.2.840.113635.100.6.2.16
595 * The leaf has a marker extension with OID 1.2.840.113635.100.6.27.9.
596 * The leaf has the provided hostname in the DNSName of the SubjectAlternativeName
597 extension or Common Name.
598 * The leaf is checked against the Black and Gray lists.
599 * The leaf has ExtendedKeyUsage with the ServerAuth OID.
600 * Revocation is checked via CRL.
601 @result A policy object. The caller is responsible for calling CFRelease
602 on this when it is no longer needed.
604 SecPolicyRef
SecPolicyCreateAppleHomeKitServerAuth(CFStringRef hostname
)
605 __OSX_AVAILABLE_STARTING(__MAC_10_11_4
, __IPHONE_9_3
);
609 #endif /* !_SECURITY_SECPOLICYPRIV_H_ */