2 * Copyright (c) 2002-2008, 2010-2014 Apple Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
25 * Modification History
27 * October 31, 2000 Allan Nathanson <ajn@apple.com>
32 #include <sys/types.h>
33 #include <sys/param.h>
37 #include "dy_framework.h"
41 #pragma mark IOKit.framework APIs
45 static void *image
= NULL
;
47 const char *framework
= "/System/Library/Frameworks/IOKit.framework/IOKit";
49 const char *suffix
= getenv("DYLD_IMAGE_SUFFIX");
50 char path
[MAXPATHLEN
];
52 strlcpy(path
, framework
, sizeof(path
));
53 if (suffix
) strlcat(path
, suffix
, sizeof(path
));
54 if (0 <= stat(path
, &statbuf
)) {
55 image
= dlopen(path
, RTLD_LAZY
| RTLD_LOCAL
);
57 image
= dlopen(framework
, RTLD_LAZY
| RTLD_LOCAL
);
64 __private_extern__ CFMutableDictionaryRef
65 _IOBSDNameMatching(mach_port_t masterPort
, uint32_t options
, const char *bsdName
)
67 #undef IOBSDNameMatching
68 static typeof (IOBSDNameMatching
) *dyfunc
= NULL
;
70 void *image
= __loadIOKit();
71 if (image
) dyfunc
= dlsym(image
, "IOBSDNameMatching");
73 return dyfunc
? dyfunc(masterPort
, options
, bsdName
) : NULL
;
77 __private_extern__ io_object_t
78 _IOIteratorNext(io_iterator_t iterator
)
81 static typeof (IOIteratorNext
) *dyfunc
= NULL
;
83 void *image
= __loadIOKit();
84 if (image
) dyfunc
= dlsym(image
, "IOIteratorNext");
86 return dyfunc
? dyfunc(iterator
) : 0;
90 __private_extern__ kern_return_t
91 _IOMasterPort(mach_port_t bootstrapPort
, mach_port_t
*masterPort
)
94 static typeof (IOMasterPort
) *dyfunc
= NULL
;
96 void *image
= __loadIOKit();
97 if (image
) dyfunc
= dlsym(image
, "IOMasterPort");
99 return dyfunc
? dyfunc(bootstrapPort
, masterPort
) : KERN_FAILURE
;
103 __private_extern__ boolean_t
104 _IOObjectConformsTo(io_object_t object
, const io_name_t className
)
106 #undef IOObjectConformsTo
107 static typeof (IOObjectConformsTo
) *dyfunc
= NULL
;
109 void *image
= __loadIOKit();
110 if (image
) dyfunc
= dlsym(image
, "IOObjectConformsTo");
112 return dyfunc
? dyfunc(object
, className
) : FALSE
;
116 __private_extern__ boolean_t
117 _IOObjectGetClass(io_object_t object
, io_name_t className
)
119 #undef IOObjectGetClass
120 static typeof (IOObjectGetClass
) *dyfunc
= NULL
;
122 void *image
= __loadIOKit();
123 if (image
) dyfunc
= dlsym(image
, "IOObjectGetClass");
125 return dyfunc
? dyfunc(object
, className
) : FALSE
;
129 __private_extern__ kern_return_t
130 _IOObjectRelease(io_object_t object
)
132 #undef IOObjectRelease
133 static typeof (IOObjectRelease
) *dyfunc
= NULL
;
135 void *image
= __loadIOKit();
136 if (image
) dyfunc
= dlsym(image
, "IOObjectRelease");
138 return dyfunc
? dyfunc(object
) : KERN_FAILURE
;
142 #if !TARGET_OS_IPHONE
144 __private_extern__ IOReturn
145 _IOPMConnectionAcknowledgeEvent(IOPMConnection myConnection
, IOPMConnectionMessageToken token
)
147 #undef IOPMConnectionAcknowledgeEvent
148 static typeof (IOPMConnectionAcknowledgeEvent
) *dyfunc
= NULL
;
150 void *image
= __loadIOKit();
151 if (image
) dyfunc
= dlsym(image
, "IOPMConnectionAcknowledgeEvent");
153 return dyfunc
? dyfunc(myConnection
, token
) : kIOReturnError
;
157 __private_extern__ IOReturn
158 _IOPMConnectionCreate(CFStringRef myName
, IOPMCapabilityBits interests
, IOPMConnection
*newConnection
)
160 #undef IOPMConnectionCreate
161 static typeof (IOPMConnectionCreate
) *dyfunc
= NULL
;
163 void *image
= __loadIOKit();
164 if (image
) dyfunc
= dlsym(image
, "IOPMConnectionCreate");
166 return dyfunc
? dyfunc(myName
, interests
, newConnection
) : kIOReturnError
;
170 __private_extern__ IOPMCapabilityBits
171 _IOPMConnectionGetSystemCapabilities(void)
173 #undef IOPMConnectionGetSystemCapabilities
174 static typeof (IOPMConnectionGetSystemCapabilities
) *dyfunc
= NULL
;
176 void *image
= __loadIOKit();
177 if (image
) dyfunc
= dlsym(image
, "IOPMConnectionGetSystemCapabilities");
179 return dyfunc
? dyfunc() : kIOPMSleepWakeInterest
;
183 __private_extern__ IOReturn
184 _IOPMConnectionRelease(IOPMConnection myConnection
)
186 #undef IOPMConnectionRelease
187 static typeof (IOPMConnectionRelease
) *dyfunc
= NULL
;
189 void *image
= __loadIOKit();
190 if (image
) dyfunc
= dlsym(image
, "IOPMConnectionRelease");
192 return dyfunc
? dyfunc(myConnection
) : kIOReturnError
;
196 __private_extern__
void
197 _IOPMConnectionSetDispatchQueue(IOPMConnection myConnection
, dispatch_queue_t myQueue
)
199 #undef IOPMConnectionSetDispatchQueue
200 static typeof (IOPMConnectionSetDispatchQueue
) *dyfunc
= NULL
;
202 void *image
= __loadIOKit();
203 if (image
) dyfunc
= dlsym(image
, "IOPMConnectionSetDispatchQueue");
206 dyfunc(myConnection
, myQueue
);
212 __private_extern__ IOReturn
213 _IOPMConnectionSetNotification(IOPMConnection myConnection
, void *param
, IOPMEventHandlerType handler
)
215 #undef IOPMConnectionSetNotification
216 static typeof (IOPMConnectionSetNotification
) *dyfunc
= NULL
;
218 void *image
= __loadIOKit();
219 if (image
) dyfunc
= dlsym(image
, "IOPMConnectionSetNotification");
221 return dyfunc
? dyfunc(myConnection
, param
, handler
) : kIOReturnError
;
224 #endif // !TARGET_OS_IPHONE
227 __private_extern__ CFTypeRef
228 _IORegistryEntryCreateCFProperty(io_registry_entry_t entry
, CFStringRef key
, CFAllocatorRef allocator
, IOOptionBits options
)
230 #undef IORegistryEntryCreateCFProperty
231 static typeof (IORegistryEntryCreateCFProperty
) *dyfunc
= NULL
;
233 void *image
= __loadIOKit();
234 if (image
) dyfunc
= dlsym(image
, "IORegistryEntryCreateCFProperty");
236 return dyfunc
? dyfunc(entry
, key
, allocator
, options
) : NULL
;
240 __private_extern__ kern_return_t
241 _IORegistryEntryCreateCFProperties(io_registry_entry_t entry
, CFMutableDictionaryRef
*properties
, CFAllocatorRef allocator
, IOOptionBits options
)
243 #undef IORegistryEntryCreateCFProperties
244 static typeof (IORegistryEntryCreateCFProperties
) *dyfunc
= NULL
;
246 void *image
= __loadIOKit();
247 if (image
) dyfunc
= dlsym(image
, "IORegistryEntryCreateCFProperties");
249 return dyfunc
? dyfunc(entry
, properties
, allocator
, options
) : KERN_FAILURE
;
253 __private_extern__ kern_return_t
254 _IORegistryEntryCreateIterator(mach_port_t masterPort
, const io_name_t plane
, IOOptionBits options
, io_iterator_t
*iterator
)
256 #undef IORegistryEntryCreateIterator
257 static typeof (IORegistryEntryCreateIterator
) *dyfunc
= NULL
;
259 void *image
= __loadIOKit();
260 if (image
) dyfunc
= dlsym(image
, "IORegistryEntryCreateIterator");
262 return dyfunc
? dyfunc(masterPort
, plane
, options
, iterator
) : KERN_FAILURE
;
266 __private_extern__ kern_return_t
267 _IORegistryEntryGetLocationInPlane(io_registry_entry_t entry
, const io_name_t plane
, io_name_t location
)
269 #undef IORegistryEntryGetLocationInPlane
270 static typeof (IORegistryEntryGetLocationInPlane
) *dyfunc
= NULL
;
272 void *image
= __loadIOKit();
273 if (image
) dyfunc
= dlsym(image
, "IORegistryEntryGetLocationInPlane");
275 return dyfunc
? dyfunc(entry
, plane
, location
) : KERN_FAILURE
;
279 __private_extern__ kern_return_t
280 _IORegistryEntryGetName(io_registry_entry_t entry
, io_name_t name
)
282 #undef IORegistryEntryGetName
283 static typeof (IORegistryEntryGetName
) *dyfunc
= NULL
;
285 void *image
= __loadIOKit();
286 if (image
) dyfunc
= dlsym(image
, "IORegistryEntryGetName");
288 return dyfunc
? dyfunc(entry
, name
) : KERN_FAILURE
;
292 __private_extern__ kern_return_t
293 _IORegistryEntryGetNameInPlane(io_registry_entry_t entry
, const io_name_t plane
, io_name_t name
)
295 #undef IORegistryEntryGetNameInPlane
296 static typeof (IORegistryEntryGetNameInPlane
) *dyfunc
= NULL
;
298 void *image
= __loadIOKit();
299 if (image
) dyfunc
= dlsym(image
, "IORegistryEntryGetNameInPlane");
301 return dyfunc
? dyfunc(entry
, plane
, name
) : KERN_FAILURE
;
305 __private_extern__ kern_return_t
306 _IORegistryEntryGetParentEntry(io_registry_entry_t entry
, const io_name_t plane
, io_registry_entry_t
*parent
)
308 #undef IORegistryEntryGetParentEntry
309 static typeof (IORegistryEntryGetParentEntry
) *dyfunc
= NULL
;
311 void *image
= __loadIOKit();
312 if (image
) dyfunc
= dlsym(image
, "IORegistryEntryGetParentEntry");
314 return dyfunc
? dyfunc(entry
, plane
, parent
) : KERN_FAILURE
;
318 __private_extern__ kern_return_t
319 _IORegistryEntryGetPath(io_registry_entry_t entry
, const io_name_t plane
, io_string_t path
)
321 #undef IORegistryEntryGetPath
322 static typeof (IORegistryEntryGetPath
) *dyfunc
= NULL
;
324 void *image
= __loadIOKit();
325 if (image
) dyfunc
= dlsym(image
, "IORegistryEntryGetPath");
327 return dyfunc
? dyfunc(entry
, plane
, path
) : KERN_FAILURE
;
331 __private_extern__ kern_return_t
332 _IORegistryEntryGetRegistryEntryID(io_registry_entry_t entry
, uint64_t *entryID
)
334 #undef IORegistryEntryGetRegistryEntryID
335 static typeof (IORegistryEntryGetRegistryEntryID
) *dyfunc
= NULL
;
337 void *image
= __loadIOKit();
338 if (image
) dyfunc
= dlsym(image
, "IORegistryEntryGetRegistryEntryID");
340 return dyfunc
? dyfunc(entry
, entryID
) : KERN_FAILURE
;
344 __private_extern__ CFTypeRef
345 _IORegistryEntrySearchCFProperty(io_registry_entry_t entry
, const io_name_t plane
, CFStringRef key
, CFAllocatorRef allocator
, IOOptionBits options
)
347 #undef IORegistryEntrySearchCFProperty
348 static typeof (IORegistryEntrySearchCFProperty
) *dyfunc
= NULL
;
350 void *image
= __loadIOKit();
351 if (image
) dyfunc
= dlsym(image
, "IORegistryEntrySearchCFProperty");
353 return dyfunc
? dyfunc(entry
, plane
, key
, allocator
, options
) : NULL
;
357 __private_extern__ kern_return_t
358 _IOServiceGetMatchingServices(mach_port_t masterPort
, CFDictionaryRef matching
, io_iterator_t
*existing
)
360 #undef IOServiceGetMatchingServices
361 static typeof (IOServiceGetMatchingServices
) *dyfunc
= NULL
;
363 void *image
= __loadIOKit();
364 if (image
) dyfunc
= dlsym(image
, "IOServiceGetMatchingServices");
366 return dyfunc
? dyfunc(masterPort
, matching
, existing
) : KERN_FAILURE
;
370 __private_extern__ CFMutableDictionaryRef
371 _IOServiceMatching(const char *name
)
373 #undef IOServiceMatching
374 static typeof (IOServiceMatching
) *dyfunc
= NULL
;
376 void *image
= __loadIOKit();
377 if (image
) dyfunc
= dlsym(image
, "IOServiceMatching");
379 return dyfunc
? dyfunc(name
) : NULL
;
383 #pragma mark Security.framework APIs
386 __loadSecurity(void) {
387 static void *image
= NULL
;
389 const char *framework
= "/System/Library/Frameworks/Security.framework/Security";
391 const char *suffix
= getenv("DYLD_IMAGE_SUFFIX");
392 char path
[MAXPATHLEN
];
394 strlcpy(path
, framework
, sizeof(path
));
395 if (suffix
) strlcat(path
, suffix
, sizeof(path
));
396 if (0 <= stat(path
, &statbuf
)) {
397 image
= dlopen(path
, RTLD_LAZY
| RTLD_LOCAL
);
399 image
= dlopen(framework
, RTLD_LAZY
| RTLD_LOCAL
);
402 return (void *)image
;
405 #define SECURITY_FRAMEWORK_EXTERN(t, s) \
406 __private_extern__ t \
409 static t *dysym = NULL; \
411 void *image = __loadSecurity(); \
412 if (image) dysym = dlsym(image, #s ); \
414 return (dysym != NULL) ? *dysym : NULL; \
417 #if !TARGET_OS_IPHONE
418 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecAttrService
)
419 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecClass
)
420 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecClassGenericPassword
)
421 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecMatchLimit
)
422 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecMatchLimitAll
)
423 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecMatchSearchList
)
424 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecReturnRef
)
425 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecGuestAttributePid
)
426 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecCodeInfoIdentifier
)
427 SECURITY_FRAMEWORK_EXTERN(CFTypeRef
, kSecCodeInfoUnique
)
429 __private_extern__ OSStatus
430 _AuthorizationMakeExternalForm(AuthorizationRef authorization
, AuthorizationExternalForm
*extForm
)
432 #undef AuthorizationMakeExternalForm
433 static typeof (AuthorizationMakeExternalForm
) *dyfunc
= NULL
;
435 void *image
= __loadSecurity();
436 if (image
) dyfunc
= dlsym(image
, "AuthorizationMakeExternalForm");
438 return dyfunc
? dyfunc(authorization
, extForm
) : -1;
441 __private_extern__ OSStatus
442 _SecAccessCreate(CFStringRef descriptor
, CFArrayRef trustedlist
, SecAccessRef
*accessRef
)
444 #undef SecAccessCreate
445 static typeof (SecAccessCreate
) *dyfunc
= NULL
;
447 void *image
= __loadSecurity();
448 if (image
) dyfunc
= dlsym(image
, "SecAccessCreate");
450 return dyfunc
? dyfunc(descriptor
, trustedlist
, accessRef
) : -1;
453 #if (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
454 __private_extern__ OSStatus
455 _SecAccessCreateFromOwnerAndACL(const CSSM_ACL_OWNER_PROTOTYPE
*owner
, uint32 aclCount
, const CSSM_ACL_ENTRY_INFO
*acls
, SecAccessRef
*accessRef
)
457 #undef SecAccessCreateFromOwnerAndACL
458 static typeof (SecAccessCreateFromOwnerAndACL
) *dyfunc
= NULL
;
460 void *image
= __loadSecurity();
461 if (image
) dyfunc
= dlsym(image
, "SecAccessCreateFromOwnerAndACL");
463 return dyfunc
? dyfunc(owner
, aclCount
, acls
, accessRef
) : -1;
465 #else // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
466 __private_extern__ SecAccessRef
467 _SecAccessCreateWithOwnerAndACL(uid_t userId
, gid_t groupId
, SecAccessOwnerType ownerType
, CFArrayRef acls
, CFErrorRef
*error
)
469 #undef SecAccessCreateWithOwnerAndACL
470 static typeof (SecAccessCreateWithOwnerAndACL
) *dyfunc
= NULL
;
472 void *image
= __loadSecurity();
473 if (image
) dyfunc
= dlsym(image
, "SecAccessCreateWithOwnerAndACL");
475 return dyfunc
? dyfunc(userId
, groupId
, ownerType
, acls
, error
) : NULL
;
477 #endif // (__MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
479 __private_extern__ OSStatus
480 _SecItemCopyMatching(CFDictionaryRef query
, CFTypeRef
*result
)
482 #undef SecItemCopyMatching
483 static typeof (SecItemCopyMatching
) *dyfunc
= NULL
;
485 void *image
= __loadSecurity();
486 if (image
) dyfunc
= dlsym(image
, "SecItemCopyMatching");
488 return dyfunc
? dyfunc(query
, result
) : -1;
491 __private_extern__ OSStatus
492 _SecKeychainCopyDomainDefault(SecPreferencesDomain domain
, SecKeychainRef
*keychain
)
494 #undef SecKeychainCopyDomainDefault
495 static typeof (SecKeychainCopyDomainDefault
) *dyfunc
= NULL
;
497 void *image
= __loadSecurity();
498 if (image
) dyfunc
= dlsym(image
, "SecKeychainCopyDomainDefault");
500 return dyfunc
? dyfunc(domain
, keychain
) : -1;
503 __private_extern__ OSStatus
504 _SecKeychainOpen(const char *pathName
, SecKeychainRef
*keychain
)
506 #undef SecKeychainOpen
507 static typeof (SecKeychainOpen
) *dyfunc
= NULL
;
509 void *image
= __loadSecurity();
510 if (image
) dyfunc
= dlsym(image
, "SecKeychainOpen");
512 return dyfunc
? dyfunc(pathName
, keychain
) : -1;
515 __private_extern__ OSStatus
516 _SecKeychainSetDomainDefault(SecPreferencesDomain domain
, SecKeychainRef keychain
)
518 #undef SecKeychainSetDomainDefault
519 static typeof (SecKeychainSetDomainDefault
) *dyfunc
= NULL
;
521 void *image
= __loadSecurity();
522 if (image
) dyfunc
= dlsym(image
, "SecKeychainSetDomainDefault");
524 return dyfunc
? dyfunc(domain
, keychain
) : -1;
527 __private_extern__ OSStatus
528 _SecKeychainItemCopyContent(SecKeychainItemRef itemRef
, SecItemClass
*itemClass
, SecKeychainAttributeList
*attrList
, UInt32
*length
, void **outData
)
530 #undef SecKeychainItemCopyContent
531 static typeof (SecKeychainItemCopyContent
) *dyfunc
= NULL
;
533 void *image
= __loadSecurity();
534 if (image
) dyfunc
= dlsym(image
, "SecKeychainItemCopyContent");
536 return dyfunc
? dyfunc(itemRef
, itemClass
, attrList
, length
, outData
) : -1;
539 __private_extern__ OSStatus
540 _SecKeychainItemCreateFromContent(SecItemClass itemClass
, SecKeychainAttributeList
*attrList
, UInt32 length
, const void *data
, SecKeychainRef keychainRef
, SecAccessRef initialAccess
, SecKeychainItemRef
*itemRef
)
542 #undef SecKeychainItemCreateFromContent
543 static typeof (SecKeychainItemCreateFromContent
) *dyfunc
= NULL
;
545 void *image
= __loadSecurity();
546 if (image
) dyfunc
= dlsym(image
, "SecKeychainItemCreateFromContent");
548 return dyfunc
? dyfunc(itemClass
, attrList
, length
, data
, keychainRef
, initialAccess
, itemRef
) : -1;
551 __private_extern__ OSStatus
552 _SecKeychainItemDelete(SecKeychainItemRef itemRef
)
554 #undef SecKeychainItemDelete
555 static typeof (SecKeychainItemDelete
) *dyfunc
= NULL
;
557 void *image
= __loadSecurity();
558 if (image
) dyfunc
= dlsym(image
, "SecKeychainItemDelete");
560 return dyfunc
? dyfunc(itemRef
) : -1;
563 __private_extern__ OSStatus
564 _SecKeychainItemFreeContent(SecKeychainAttributeList
*attrList
, void *data
)
566 #undef SecKeychainItemFreeContent
567 static typeof (SecKeychainItemFreeContent
) *dyfunc
= NULL
;
569 void *image
= __loadSecurity();
570 if (image
) dyfunc
= dlsym(image
, "SecKeychainItemFreeContent");
572 return dyfunc
? dyfunc(attrList
, data
) : -1;
575 __private_extern__ OSStatus
576 _SecKeychainItemModifyContent(SecKeychainItemRef itemRef
, const SecKeychainAttributeList
*attrList
, UInt32 length
, const void *data
)
578 #undef SecKeychainItemModifyContent
579 static typeof (SecKeychainItemModifyContent
) *dyfunc
= NULL
;
581 void *image
= __loadSecurity();
582 if (image
) dyfunc
= dlsym(image
, "SecKeychainItemModifyContent");
584 return dyfunc
? dyfunc(itemRef
, attrList
, length
, data
) : -1;
588 __private_extern__ OSStatus
589 _SecTrustedApplicationCreateFromPath(const char *path
, SecTrustedApplicationRef
*app
)
591 #undef SecTrustedApplicationCreateFromPath
592 static typeof (SecTrustedApplicationCreateFromPath
) *dyfunc
= NULL
;
594 void *image
= __loadSecurity();
595 if (image
) dyfunc
= dlsym(image
, "SecTrustedApplicationCreateFromPath");
597 return dyfunc
? dyfunc(path
, app
) : -1;
600 #else // TARGET_OS_IPHONE
602 SECURITY_FRAMEWORK_EXTERN(CFStringRef
, kSecPropertyKeyValue
)
603 SECURITY_FRAMEWORK_EXTERN(CFStringRef
, kSecPropertyKeyLabel
)
605 __private_extern__ CFArrayRef
606 _SecCertificateCopyProperties(SecCertificateRef certRef
)
608 #undef SecCertificateCopyProperties
609 static typeof (SecCertificateCopyProperties
) *dyfunc
= NULL
;
611 void *image
= __loadSecurity();
612 if (image
) dyfunc
= dlsym(image
, "SecCertificateCopyProperties");
614 return dyfunc
? dyfunc(certRef
) : NULL
;
617 #endif // TARGET_OS_IPHONE
619 __private_extern__ SecCertificateRef
620 _SecCertificateCreateWithData(CFAllocatorRef allocator
, CFDataRef data
)
622 #undef SecCertificateCreateWithData
623 static typeof (SecCertificateCreateWithData
) *dyfunc
= NULL
;
625 void *image
= __loadSecurity();
626 if (image
) dyfunc
= dlsym(image
, "SecCertificateCreateWithData");
628 return dyfunc
? dyfunc(allocator
, data
) : NULL
;