首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用Cassini进行SSL身份验证

使用Cassini进行SSL身份验证
EN

Stack Overflow用户
提问于 2011-06-09 22:14:04
回答 1查看 603关注 0票数 0

我们可以对ultra cassini使用以下方法吗?据我所知,IIS非常好用

代码语言:javascript
复制
- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace {
  return [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust];
}

- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
  if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust])
    if ([trustedHosts containsObject:challenge.protectionSpace.host])
      [challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust] forAuthenticationChallenge:challenge];

  [challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge];
}

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-06-09 22:17:26

我不确定Cassini是否有内置的身份验证级别,但我有点怀疑。我非常确定您应该能够使用IIS Express,它将取代Cassini。

查看有关IIS Express的Scott Guthrie's blog post

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6294208

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档