[英]QSslSocket: cannot resolve SSLV2_client_method
I have created a sslclient and sslserver using QSslSocket in Qt 5.4.1 in debian wheezy. 我在debian wheezy的Qt 5.4.1中使用QSslSocket创建了一个sslclient和sslserver。 When I run the program they dont work at all.
当我运行程序时,他们根本不工作。 After debuging my code I saw when it try to create a new object from
QSslSocket
it return this error ( cannot resolve SSLV2_client_method
) in constractor. 在调试我的代码之后,我看到当它尝试从
QSslSocket
创建一个新对象时,它会在QSslSocket
返回此错误( cannot resolve SSLV2_client_method
)。
this is block of my code: 这是我的代码块:
SSlClient::SSlClient(QObject *parent) : QObject(parent)
{
client = new QSslSocket(this);
client->setProtocol(QSsl::SslV3);
connect(client, SIGNAL(encrypted()), this, SLOT(startTransfer()));
connect(client, SIGNAL(encryptedBytesWritten(qint64)), this, SLOT(byteWritten()));
}
通过将openssl编译为共享库解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.