Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1654)

Unified Diff: runtime/bin/secure_socket_macos.cc

Issue 1820183002: Use SecItemImport instead of SecKeychainItemImport (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(&params, 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, &params, 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(&params, 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, &params, keychain, &items);
if (status != noErr) {
if (SSL_LOG_CERTS) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698