Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: How to add the keyLabel to a private key?



Doug and all,

The issues have been resulted. 
Thanks anyway.

Ben
 

-----Original Message-----
From: Ben Zhu 
Sent: Thursday, January 05, 2006 5:54 PM
To: 'Doug Mitchell'
Cc: email@hidden
Subject: RE: How to add the keyLabel to a private key?

 
Doug,

I can import a private key now, but I have two issues:

1. when the SecKeychainItemimport is called, I don't want it pops up a
dialog box to ask me if allowing this action.
   I have set the ImportParams.alertTitle, ImportParams.alertPrompt, and
ImportParams.passphrase to NULLs. It seems it still doesn't work.
   Is there anyway to suppress this?

2. After a successful import, the SecKeychainItemModifyAttributesAndData
is called, but it returns a -25294 error (The Keychain does not exist).
Try to fix this problem, before calling this function, I set my keychain
as the default keychain, but the result is the same.

Here is my code:

CFArrayRef privateKeyItem = NULL;
SecKeychainItemImport(..., &privateKeyItem); ...
SecKeychainItemRef prvKey;
prvKey = (SecKeychainItemRef) CFArrayGetValueAtIndex(privateKeyItem, 0);
SecKeychainItemModifyAttributesAndData(prvKey, &attrs, 0, NULL);


Any Suggestions?

Thanks
Ben


  

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Apple-cdsa mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/apple-cdsa/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.