# HG changeset patch # User weijun # Date 1442112958 -28800 # Node ID f98d9515afea08245595a54897ee7799979f28c5 # Parent b10b64263b563e21f055c881444f625ec618b826 8136425: KeystoreImpl.m using wrong type for cert format Reviewed-by: vinnie diff -r b10b64263b56 -r f98d9515afea src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m --- a/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m Fri Sep 11 13:00:20 2015 -0700 +++ b/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m Sun Sep 13 10:55:58 2015 +0800 @@ -508,7 +508,7 @@ SecKeychainRef defaultKeychain = NULL; SecKeychainCopyDefault(&defaultKeychain); - SecExternalItemType dataType = (isCertificate == JNI_TRUE ? kSecFormatX509Cert : kSecFormatWrappedPKCS8); + SecExternalFormat dataFormat = (isCertificate == JNI_TRUE ? kSecFormatX509Cert : kSecFormatWrappedPKCS8); // Convert the password obj into a CFStringRef that the keychain importer can use for encryption. SecKeyImportExportParameters paramBlock; @@ -533,7 +533,7 @@ paramBlock.keyUsage = CSSM_KEYUSE_ANY; paramBlock.keyAttributes = CSSM_KEYATTR_RETURN_DEFAULT; - err = SecKeychainItemImport(cfDataToImport, NULL, &dataType, NULL, + err = SecKeychainItemImport(cfDataToImport, NULL, &dataFormat, NULL, 0, ¶mBlock, defaultKeychain, &createdItems); if (err == noErr) {