From 20b057fc29bf0dbe275be018f5c5a7fece7e1d9a Mon Sep 17 00:00:00 2001 From: Weijun Wang Date: Sun, 13 Sep 2015 10:55:58 +0800 Subject: [PATCH] 8136425: KeystoreImpl.m using wrong type for cert format Reviewed-by: vinnie --- jdk/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m b/jdk/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m index 179151440da..cdc39aa7923 100644 --- a/jdk/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m +++ b/jdk/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m @@ -508,7 +508,7 @@ JNF_COCOA_ENTER(env); 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 @@ JNF_COCOA_ENTER(env); 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) {