I'm adding identity to SecKeyChain and then I'm trying to get it back using SecKeyChain.QueryAsConcreteType. But using any SecRecord query I get SecStatusCode.Param. Looks like the problem is that when I use new SecRecord(SecKind.Identity) it doesn't put kSecClass to dictionary that is Ok for adding but fails querying.
public SecRecord(SecKind secKind)
IntPtr num = SecClass.FromSecKind(secKind);
if (num == SecClass.Identity)
this._queryDict = new NSMutableDictionary();
this.queryDict = NSMutableDictionary.LowlevelFromObjectAndKey(num, SecClass.SecClassKey);
If I'm wrong, please explain me how to add identity to SecKeyChain and then retrieve it.