如何將安全身份(證書+私鑰)添加到iPhone鑰匙串? 我在應用程序中有.p12文件。我可以用SecPKCS12Import(),但 從它那裏得到認同,當我嘗試做到以下幾點:如何將安全標識(證書+私鑰)添加到iPhone鑰匙串?
NSMutableDictionary *secIdentityParams = [[NSMutableDictionary alloc] init];
[secIdentityParams setObject:(id)kSecClassIdentity forKey:(id)kSecClass];
[secIdentityParams setObject:label forKey:(id)kSecAttrLabel];
[secIdentityParams setObject:(id)myIdentity forKey:(id)kSecValueRef];
status = SecItemAdd((CFDictionaryRef) secIdentityParams, NULL);
我收到錯誤= -25291 - >不信任的結果是可用的。 我在做什麼錯?
OMG,就是這樣,沒有把類屬性放在它的工作。爲什麼O爲什麼安全框架如此複雜,記錄不完整和挑剔?浪費時間太多了。 – 2016-06-09 16:25:28