]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_keychain/lib/SecImportExport.c
Security-59306.61.1.tar.gz
[apple/security.git] / OSX / libsecurity_keychain / lib / SecImportExport.c
index 387011535cd037a375842449c5e705ddebf948dd..2b8f820d1c64f660369f9e8141eef992453f3e17 100644 (file)
 #include <Security/SecPolicy.h>
 #include <Security/SecTrust.h>
 #include <Security/SecKeyPriv.h>
 #include <Security/SecPolicy.h>
 #include <Security/SecTrust.h>
 #include <Security/SecKeyPriv.h>
-#include "SecInternal.h"
+#include <Security/SecInternal.h>
 
 //#include <AssertMacros.h>
 #include <CommonCrypto/CommonDigest.h>
 
 //#include "p12import.h"
 
 //#include <AssertMacros.h>
 #include <CommonCrypto/CommonDigest.h>
 
 //#include "p12import.h"
-#include <Security/SecImportExport.h>
+#include <Security/SecImportExportPriv.h>
+
+#include <CoreFoundation/CFPriv.h>
 
 const CFStringRef __nonnull kSecImportExportPassphrase = CFSTR("passphrase");
 const CFStringRef __nonnull kSecImportExportKeychain = CFSTR("keychain");
 
 const CFStringRef __nonnull kSecImportExportPassphrase = CFSTR("passphrase");
 const CFStringRef __nonnull kSecImportExportKeychain = CFSTR("keychain");
@@ -139,6 +141,9 @@ out:
 
 OSStatus SecPKCS12Import(CFDataRef pkcs12_data, CFDictionaryRef options, CFArrayRef *items)
 {
 
 OSStatus SecPKCS12Import(CFDataRef pkcs12_data, CFDictionaryRef options, CFArrayRef *items)
 {
+       if (_CFMZEnabled()) {
+               return SecPKCS12Import_ios(pkcs12_data, options, items);
+       }
        // SecPKCS12Import is implemented on Mac OS X in terms of the existing
        // SecKeychainItemImport API, which supports importing items into a
        // specified keychain with initial access control settings for keys.
        // SecPKCS12Import is implemented on Mac OS X in terms of the existing
        // SecKeychainItemImport API, which supports importing items into a
        // specified keychain with initial access control settings for keys.