这是我使用自签名证书进行身份验证的非常标准的NSURLConnection回调:-(SecCertificateRef)certRefFromDerNamed:(NSString*)derFileNameresultingDataRef:(CFDataRef*)dataRefPtr{NSString*thePath=[[NSBundlemainBundle]pathForResource:derFileNameofType:@"der"];NSData*certData=[[NSDataalloc]initWithContentsOfFile:thePath];CFDataRefcer
文档说:“如果不是所有验证叶证书所需的证书都包含在信任管理对象中,则SecTrustEvaluate会在钥匙串(keychain)搜索列表(请参阅SecTrustSetKeychains)和系统的anchor证书存储中搜索证书(请参阅SecTrustSetAnchorCertificates)。但是,由于SecTrustSetKeychains()在iOS上不可用,因此尚不清楚此函数是否也会在应用程序的钥匙串(keychain)中查找。 最佳答案 您发帖似乎已经有一段时间了,所以我不确定您是否还需要答案。如果您的用例是“我遇到了co
当我部署并启动我的应用程序时,它在白屏上卡住,并且我在我的设备日志中看到以下错误:Jun711:21:42device-inno10profiled[130]:(Note)MC:ProvisioningprofileschangedJun711:21:42device-inno10profiled[130]:(Note)MC:UpdatingMIStrust...Jun711:21:42device-inno10installd[50]:SecTrustEvaluate[leafIssuerCommonNameSubjectCommonName]Jun711:21:50device-i
我的应用程序尝试评估自签名证书的服务器信任证书。这适用于SecPolicyCreateBasicX509,但不适用于SecPolicyCreateSSL这是我的代码:if(challenge.protectionSpace.authenticationMethod==NSURLAuthenticationMethodServerTrust){//createtrustfromprotectionspaceSecTrustReftrustRef;inttrustCertificateCount=SecTrustGetCertificateCount(challenge.protectio