【问题标题】:ASIHTTPRequestErrorDomain : (possibly a bad/expired/self-signed certificate)ASIHTTPRequestErrorDomain :(可能是坏/过期/自签名证书)
【发布时间】:2011-12-30 23:55:07
【问题描述】:

当我使用 https 访问网站 API 时,ASIHTTPRequest 无法得到响应。我收到以下错误:

ASI 错误:: Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred: SSL problem (possibly a bad/expired/self-signed certificate)" UserInfo=0x4e5ccd0 {NSUnderlyingError=0x4e5ce40 "操作无法完成. (OSStatus error -9807.)", NSLocalizedDescription=发生连接失败:SSL 问题(可能是错误/过期/自签名证书)}


我想我收到此错误是因为我自己生成了 SSL 证书,而不是购买证书。那正确吗? “SSL 问题(可能是错误/过期/自签名证书)}”是否意味着我应该为我的服务器购买 SSL 证书?

【问题讨论】:

标签: ssl https asihttprequest


【解决方案1】:

您说得对,自签名 SSL 证书会导致此错误。也就是说,您不必购买 SSL 证书。

如果这是针对内部应用程序,我只需使用以下命令禁用 Cert 检查:

[request setValidatesSecureCertificate:NO];

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-10-19
    • 2019-09-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-23
    • 2013-01-02
    相关资源
    最近更新 更多