PDA

View Full Version : Https server - logging by QSsl



Trok
23rd September 2010, 22:53
Hi, i need to connect with https server and then logging on site. It's my current code:



void Http_request::Logging(){
request.setUrl(QUrl("https://examplesite.com"));
request.setHeader(QNetworkRequest::ContentTypeHead er, QVariant("application/x-www-form-urlencoded"));
QString dataRequest = "ACCOUNTLOGIN_ACCOUNTNAME=login&ACCOUNTLOGIN_PASSWORD=pass";
reply = manager->post(request, dataRequest.toAscii());
}
But i get some warnings:


QSslSocket: cannot call unresolved function SSLv3_client_method
QSslSocket: cannot call unresolved function SSL_CTX_new
QSslSocket: cannot call unresolved function SSL_library_init
QSslSocket: cannot call unresolved function ERR_get_error
QSslSocket: cannot call unresolved function ERR_error_string

and don't recive any bytes of site. I tried to fix that by:
QSslConfiguration sslConfiguration = reply->sslConfiguration();
but it doesn't work correct, i recive some errors that 'QNetworkReply' class has no member named 'sslConfiguration'. So i'm looking for the simplest way to resolve problem with this secured server. Can anyone have some idea how may i fix it?
Yours Trok

wysota
23rd September 2010, 23:11
Do you have OpenSSL installed?

Trok
24th September 2010, 00:22
Thanks a lot, i install OpenSSL and it's working like i wanted :)