|
我用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);
|
|