gpt4 book ai didi

ios - 使用 Cassini 进行 SSL 身份验证

转载 作者:太空宇宙 更新时间:2023-11-03 14:20:45 24 4
gpt4 key购买 nike

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

- (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];
}

谢谢

最佳答案

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

查看 Scott Guthrie's blog post关于 IIS Express。

关于ios - 使用 Cassini 进行 SSL 身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6294208/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com