PDA

View Full Version : ssl problem



hashb
11th August 2009, 10:27
Hi,

I am tesing qnotifier which access https website of gmail rss feed,

codes:

http_.setHost("mail.google.com", QHttp::ConnectionModeHttps);
http_.setUser(user, pass);
http_.get("/mail/feed/atom");

what puzzle me is :
in linux it works well

but in window I got the following error:
" error,HTTPS connection requested but SSL support not compiled in"

am i miss something when compile QT in windows?

my QT is QT4.5.2

Thanks advance for your help.

hb

yogeshgokul
11th August 2009, 10:30
Check this:

bool QSslSocket::supportsSsl () [static]
Returns true if this platform supports SSL; otherwise, returns false. So check it first.

hashb
11th August 2009, 11:07
Hi,yogeshgokul

Thanks a lot for your input,
How can I solve it in windows? should i recompile QT with specific config?

hb

faldzip
11th August 2009, 11:17
yes, you have to recompile after adding proper option in configure.exe, but first you have to have SSL support in your system - so install OpenSSL.

hashb
13th August 2009, 08:56
Hi,

I have download openssl and
config QT using:
configure -openssl -I c:\openssl\outinc -L c:\openssl\out -openssl-linked
OPENSSL_LIBS="-leay32 -lssl32" -release
then recompiled QT.

but after I compiled
examples\network\securesocketclient
when running ,it still report:
The system does not support OPENSSL

what's going wrong?????????

Thanks,
hb

hashb
13th August 2009, 10:31
BTW:
I compiled QT using mingw32

hashb
15th August 2009, 00:45
Hi,There,

The problem has been solved ,i used the openssl installer instead of compile openssl source code,and it works now.

I download openssl installer from
http://www.slproweb.com/products/Win32OpenSSL.html

after install openssl,then rebuild QT using
configure -release -openssl -I C:\OpenSSL\include -L C:\OpenSSL\lib\MinGW
mingw32-make

Thanks a lot for all help

Best regards,
hb