找回密码
 立即注册
收起左侧

用QSslSocket协议出现错误,求大神解决

0
回复
4682
查看
[复制链接]
累计签到:2 天
连续签到:1 天
来源: 2014-3-7 21:09:07 显示全部楼层 |阅读模式

马上注册,查看详细内容!注册请先查看:注册须知

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
我用qsslsocket做apns推送服务,在连接过程的中出现了报错:
The issuer certificate of a locally looked up certificate could not be found"
"The root CA certificate is not trusted for this purpose"
"The issuer certificate of a locally looked up certificate could not be found"
"No certificates could be verified"
他说我**错误,当我用php测试推送行的..大家知道什么原因嘛?
设置**的的代码:
    if(certFile.open(QFile::ReadOnly))    {        config.setLocalCertificate(QSslCertificate(certFile.readAll()));    }else    {        qDebug()<<certFile.errorString();    }    certFile.close();
    QFile keyFile(keyPath);    if(keyFile.open(QFile::ReadOnly))    {        config.setPrivateKey(QSslKey(keyFile.readAll(),QSsl::Rsa,QSsl::Pem,QSsl::PrivateKey,"Myapple1d"));
    }else    {        qDebug()<<keyFile.errorString();    }    keyFile.close();
    config.setPeerVerifyMode(QSslSocket::VerifyPeer);    this->setSslConfiguration(config);
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

公告
可以关注我们的微信公众号yafeilinux_friends获取最新动态,或者加入QQ会员群进行交流:190741849、186601429(已满) 我知道了