Index: runtime/bin/secure_socket_macos.cc |
diff --git a/runtime/bin/secure_socket_macos.cc b/runtime/bin/secure_socket_macos.cc |
index 7b0dbd42c450f90f770022be21a4387a54b15874..53c9ae78889340d9a027f4eefc3365e29ee1e549 100644 |
--- a/runtime/bin/secure_socket_macos.cc |
+++ b/runtime/bin/secure_socket_macos.cc |
@@ -535,15 +535,14 @@ static OSStatus TryPEMImport(CFDataRef cfdata, |
SecExternalFormat format = kSecFormatPEMSequence; |
SecExternalItemType sitem_type = kSecItemTypeAggregate; |
- SecKeyImportExportParameters params; |
+ SecItemImportExportKeyParameters params; |
memset(¶ms, 0, sizeof(params)); |
params.version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION; |
params.flags = kSecKeyNoAccessControl; |
params.passphrase = password; |
- params.keyAttributes = CSSM_KEYATTR_EXTRACTABLE; |
CFArrayRef items = NULL; |
- status = SecKeychainItemImport( |
+ status = SecItemImport( |
cfdata, NULL, &format, &sitem_type, 0, ¶ms, NULL, &items); |
if (status != noErr) { |
@@ -630,12 +629,11 @@ static OSStatus TryPKCS12Import(CFDataRef cfdata, |
SecExternalFormat format = kSecFormatPKCS12; |
SecExternalItemType sitem_type = kSecItemTypeAggregate; |
- SecKeyImportExportParameters params; |
+ SecItemImportExportKeyParameters params; |
memset(¶ms, 0, sizeof(params)); |
params.version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION; |
params.flags = kSecKeyNoAccessControl; |
params.passphrase = password; |
- params.keyAttributes = CSSM_KEYATTR_EXTRACTABLE; |
CFArrayRef items = NULL; |
if (SSL_LOG_CERTS) { |
@@ -676,7 +674,7 @@ static OSStatus TryPKCS12Import(CFDataRef cfdata, |
*out_keychain = keychain; |
} |
- status = SecKeychainItemImport( |
+ status = SecItemImport( |
cfdata, NULL, &format, &sitem_type, 0, ¶ms, keychain, &items); |
if (status != noErr) { |
if (SSL_LOG_CERTS) { |