iphone - 使用证书、 key 和信任编程指南中的代码示例时出现“extractIdentityAndTrust”错误和警告

标签 iphone ios ios4 ios-4.2

我正在尝试使用“证书、 key 和信任编程指南”中的代码。在关于从 p12 文件中提取和评估身份的部分中,使用指南中给出的代码时出现错误和警告。

线

status = extractIdentityAndTrust(inPKCS12Data, &myIdentity, &myTrust);

给出警告:“函数 extractIdentityAndTrust 的隐式声明”

而 extractIdentityAndTrust 的函数声明"
OSStatus extractIdentityAndTrust(CFDataRef inPKCS12Data,SecIdentityRef *outIdentity,SecTrustRef *outTrust)

给我错误:extractIdentityAndTrust 的类型冲突。

我只是试图实现指南中给出的代码示例。请指导我在这方面哪里出错了。

最佳答案

我的错!!没有在头文件中声明方法。

关于iphone - 使用证书、 key 和信任编程指南中的代码示例时出现“extractIdentityAndTrust”错误和警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4734193/

相关文章:

iphone - 将 subview 添加到不滚动的 tableview

iphone - 我只想支持 UIInterfaceOrientationLandscapeRight 和 UIInterfaceOrientationLandscapeLeft

iphone - iTunes 连接应用程序图标

iOS : NSFileManager copyItemAtPath is memory intensive

ios - 在 iOS 中,为什么 [[NSDate date]timeIntervalSince1970] 在内部是双重的?虽然应该很长很长

ios - 使用 UItableViewCell 类型的表达式初始化 'CustomCellView *' 的不兼容指针类型

iphone - FacebookSDK - 未知类型 ACAccountCredentialRenewResult 错误

javascript - 从 Web 应用程序访问 iPhone 上的位置信息

ios - Theos 无法在我的 iPad 3 上运行

objective-c - 如何在 GCD block 中指定返回类型