changeset 32633:936a7bf9e183

8136425: KeystoreImpl.m using wrong type for cert format Reviewed-by: vinnie
author weijun
date Sun, 13 Sep 2015 10:55:58 +0800
parents 6521875cb63e
children 614f8e5859aa 7fabd3486dea
files jdk/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/java.base/macosx/native/libosxsecurity/KeystoreImpl.m	Wed Jul 05 20:49:25 2017 +0200
+++ b/jdk/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, &paramBlock, defaultKeychain, &createdItems);
 
     if (err == noErr) {