NSMutableURLRequest 检查 Https SSL 证书验证

发布于 2025-01-02 03:24:24 字数 147 浏览 1 评论 0原文

我正在尝试在我的应用程序中使用 ssl,显然我没有注意到 NSURLConnection 在使用带有自签名证书的 https 时抛出任何异常。我很好奇不验证证书的可能性是什么?我正在嗅探数据包,它使用 https 端口来绕过事务,但不会以某种方式遇到异常。

谢谢。

I am trying to utilize ssl for my application and apparently I don't notice that NSURLConnection is throwing any exception when using https with self signed cert. I am curious what might be the possibilities for not validating cert? I am sniffing the packets and it is using https port to bypass the transaction, but don't encounter the exception somehow.

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ぃ双果 2025-01-09 03:24:24

如果证书是自签名的,那么它实际上不是受信任的 https 证书。如果您想绕过它,请使用以下代码片段:

如何使用 NSURLConnection 连接 SSL 以获得不受信任的证书?

If the cert is self-signed then it isn't actually a trusted https cert. If you want to bypass it use the code snippet at:

How to use NSURLConnection to connect with SSL for an untrusted cert?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文