Page 1 of 2 12 LastLast
Results 1 to 20 of 30

Thread: qssl

  1. #1
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post qssl

    hi,
    i am new to qt. I have download files from serever which is ssl implemented.

    so https://www..................like

    i used example program in qt

    but in that he has written if

    " ifndef "QT_NO_OPENSSL
    lineedit="https://"

    in my system how can define OPENSSL

    pease tell me

    Advanced thanks

  2. #2
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qssl

    if your qt is built with ssl, OPENSSL would be defined

  3. #3
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: qssl

    yes,
    i am new to qt. i don't know how to build qt with openssl. Please tell me the procedure to build qt with openssl, so that i'll be thankful to you.

  4. #4
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qssl

    this should help you.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  5. #5
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: qssl

    i have downloaded and instaleed openssl from

    [link]
    http://www.openssl.org/related/binaries.html
    [/link]

    but to set environmental variables what u have told is

    SET LIB=D:\develop\OpenSSL\lib\VC;%LIB% -- if you use MS VS or
    SET LIB=D:\develop\OpenSSL\lib\MinGW;%LIB% -- if you use MinGW
    SET INCLUDE=D:\develop\OpenSSL\include;%INCLUDE%
    in my installation i have only bin directory.
    i don't have lib or MinGW directory

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qssl

    Are you sure you need to rebuild Qt? Is there any warning message you are getting or something? Qt comes with SSL support already active, if not from OpenSSL then from Windows' SSL implementation.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: qssl

    i think openssl is not defined in my qt, because i am using qt examples directory http program for downloading files. in that if openssl is defined "https://" will come in line editor else "http:" .i have to download files from "https"

  8. #8
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qssl

    do you use Qt SDK?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qssl

    Quote Originally Posted by jsmith View Post
    i think openssl is not defined in my qt, because i am using qt examples directory http program for downloading files. in that if openssl is defined "https://" will come in line editor else "http:" .i have to download files from "https"
    Run the "securesocketclient" example and see if you get an error message about missing SSL functionality.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  10. #10
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: qssl

    yes,
    i have both qt SDK, and qt 4.4.3

  11. #11
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qssl

    so, you can find mingw in SDKDIR/2009.01/mingw and Qt in SDKDIR/2009.01/qt. so, change that paths which I specified as example to you relevant paths and everything should work.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  12. #12
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: qssl

    when i am rebuilding qt 4.4.3 for openssl support error is coming like this

    qsslcertificate.cpp
    ssl\qsslsocket_openssl_p.h(70) : fatal error C1083: Cannot open include file: 'openssl/asn1.h': No such file or directory
    in openssl directory asnl.h is not there.

    please suggest me to complete this

  13. #13
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qssl

    did you donwload OpenSSL with headers?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  14. #14
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qssl

    Did you try running the example as I suggested?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  15. #15
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: qssl

    i have downloaded openssl from second option
    and installed but in that no included firles are available only .dll are there

  16. #16
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qssl

    Quote Originally Posted by wysota View Post
    Did you try running the example as I suggested?
    there is no OpenSSL support in Qt SDK, if you don't believe there is a console messages of build an example which you suggested to build
    D:\develop\Qt\2009.01\qt\examples\network\secureso cketclient>mingw32-make
    mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `D:/develop/Qt/2009.01/qt/examples/network/s
    ecuresocketclient'
    d:\develop\Qt\2009.01\qt\bin\uic.exe certificateinfo.ui -o ui_certificateinfo.h
    d:\develop\Qt\2009.01\qt\bin\uic.exe sslclient.ui -o ui_sslclient.h
    d:\develop\Qt\2009.01\qt\bin\uic.exe sslerrors.ui -o ui_sslerrors.h
    g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -
    DQT_EDITION=QT_EDITION_DESKTOP -DQT_DLL -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_
    LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"..\..\..\include\QtCore" -I"..\..\..
    \include\QtNetwork" -I"..\..\..\include\QtGui" -I"..\..\..\include" -I"..\..\..\
    include\ActiveQt" -I"tmp\moc\debug_shared" -I"." -I"..\..\..\include" -I"d:\deve
    lop\Qt\2009.01\mingw\include" -I"..\..\..\mkspecs\win32-g++" -o tmp\obj\debug_sh
    ared\certificateinfo.o certificateinfo.cpp
    In file included from certificateinfo.cpp:42:
    certificateinfo.h:59: error: `QSslCertificate' was not declared in this scope
    certificateinfo.h:59: error: template argument 1 is invalid
    certificateinfo.h:59: error: ISO C++ forbids declaration of `chain' with no type

    certificateinfo.h:66: error: `QSslCertificate' was not declared in this scope
    certificateinfo.h:66: error: template argument 1 is invalid
    certificateinfo.h:66: error: ISO C++ forbids declaration of `chain' with no type

    certificateinfo.cpp:60: error: `QSslCertificate' was not declared in this scope
    certificateinfo.cpp:60: error: template argument 1 is invalid
    certificateinfo.cpp:61: error: ISO C++ forbids declaration of `chain' with no ty
    pe
    certificateinfo.cpp: In member function `void CertificateInfo::setCertificateCha
    in(const int&)':
    certificateinfo.cpp:66: error: request for member `size' in `chain', which is of
    non-class type `const int'
    certificateinfo.cpp:67: error: expected initializer before '&' token
    certificateinfo.cpp:69: error: `cert' was not declared in this scope
    certificateinfo.cpp:69: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:69: error: `Organization' was not declared in this scope
    certificateinfo.cpp:70: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:70: error: `CommonName' was not declared in this scope
    certificateinfo.cpp:69: warning: unused variable 'Organization'
    certificateinfo.cpp:70: warning: unused variable 'CommonName'
    certificateinfo.cpp: In member function `void CertificateInfo::updateCertificate
    Info(int)':
    certificateinfo.cpp:79: error: request for member `size' in `((CertificateInfo*)
    this)->CertificateInfo::chain', which is of non-class type `int'
    certificateinfo.cpp:80: error: expected initializer before '&' token
    certificateinfo.cpp:82: error: `cert' was not declared in this scope
    certificateinfo.cpp:82: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:82: error: `Organization' was not declared in this scope
    certificateinfo.cpp:83: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:83: error: `OrganizationalUnitName' was not declared in this
    scope
    certificateinfo.cpp:84: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:84: error: `CountryName' was not declared in this scope
    certificateinfo.cpp:85: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:85: error: `LocalityName' was not declared in this scope
    certificateinfo.cpp:86: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:86: error: `StateOrProvinceName' was not declared in this sc
    ope
    certificateinfo.cpp:87: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:87: error: `CommonName' was not declared in this scope
    certificateinfo.cpp:89: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:90: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:91: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:92: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:93: error: `QSslCertificate' has not been declared
    certificateinfo.cpp:94: error: `QSslCertificate' has not been declared
    mingw32-make[1]: *** [tmp/obj/debug_shared/certificateinfo.o] Error 1
    mingw32-make[1]: Leaving directory `D:/develop/Qt/2009.01/qt/examples/network/se
    curesocketclient'
    mingw32-make: *** [debug] Error 2
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  17. #17
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qssl

    Quote Originally Posted by jsmith View Post
    i have downloaded openssl from second option
    and installed but in that no included firles are available only .dll are there
    use this link.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  18. #18
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: qssl

    yes,
    i have run qsslsocket example, 100 errors are coming here i am posting 2 errors

    d:\qt\2009.01\qt\examples\network\securesocketclie nt\certificateinfo.h:59:

    error: 'QSslCertificate' : undeclared identifier

    D:/Qt/2009.01/qt/examples/network/securesocketclient/./certificateinfo.cpp:86: error: 'StateOrProvinceName' : is not a member of '`global namespace''

  19. #19
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qssl

    I meant to run it, not to build it (of course only if examples come prebuilt with the Qt+MinGW bundle). You might not have SSL development files installed but it doesn't mean you don't have SSL support in your Qt enabled. You might be unable to build SSL-enabled apps but you can still execute ones that are already built. In that case copying/installing only the SSL development files should be enough.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  20. #20
    Join Date
    Apr 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: qssl

    i have downloaded openssl from u rlink and instaleed. and i set environmental variables for lib and include

    now i configure qt 4.4.3 as

    > nmake confclean
    >configure -platform win32-msvc -openssl

    here errors are coming as

    qabstractsocketengine.cpp
    qnativesocketengine.cpp
    qhttpsocketengine.cpp
    qsocks5socketengine.cpp
    qabstractsocket.cpp
    qtcpsocket.cpp
    qudpsocket.cpp
    qtcpserver.cpp
    qlocalsocket.cpp
    qlocalserver.cpp
    qnativesocketengine_win.cpp
    qlocalsocket_win.cpp
    qlocalserver_win.cpp
    Generating Code...
    cl -c -FIqt_pch.h -Yuqt_pch.h -Fptmp\obj\debug_shared\QtNetworkd_pch.pch
    -nologo -Zm200 -Zi -MDd -W3 -GR -GX -DQT_SHARED -DQT_THREAD_SUPPORT -DUNICODE -
    DQT_LARGEFILE_SUPPORT -DQT_BUILD_NETWORK_LIB -DQT_NO_USING_NAMESPACE -DQT_MAKEDL
    L -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -
    D_USE_MATH_DEFINES -DQT_DLL -DQT_CORE_LIB -I"..\..\include\QtCore" -I"..\..\incl
    ude\QtCore" -I"..\..\include" -I"..\..\include\QtNetwork" -I"tmp\rcc\debug_share
    d" -I"tmp" -I"..\3rdparty\zlib" -I"kernel" -I"d:\Qt1\4.4.3\include\ActiveQt" -I"
    tmp\moc\debug_shared" -I"." -I"..\..\mkspecs\win32-msvc" -Fotmp\obj\debug_shared
    \ @C:\DOCUME~1\e451493\LOCALS~1\Temp\nmd03312.
    qssl.cpp
    qsslcertificate.cpp
    ssl\qsslsocket_openssl_p.h(70) : fatal error C1083: Cannot open include file: 'o
    penssl/asn1.h': No such file or directory
    qsslconfiguration.cpp
    qsslcipher.cpp
    qsslerror.cpp
    qsslkey.cpp
    ssl\qsslsocket_openssl_p.h(70) : fatal error C1083: Cannot open include file: 'o
    penssl/asn1.h': No such file or directory
    qsslsocket.cpp
    ssl\qsslsocket_openssl_p.h(70) : fatal error C1083: Cannot open include file: 'o
    penssl/asn1.h': No such file or directory
    qsslsocket_openssl.cpp
    ssl\qsslsocket_openssl_p.h(70) : fatal error C1083: Cannot open include file: 'o
    penssl/asn1.h': No such file or directory
    qsslsocket_openssl_symbols.cpp
    ssl\qsslsocket_openssl_p.h(70) : fatal error C1083: Cannot open include file: 'o
    penssl/asn1.h': No such file or directory
    Generating Code...
    NMAKE : fatal error U1077: 'cl' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'C:\PROGRA~1\MIAF9D~1\VC98\BIN\NMAKE.EXE' : return co
    de '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.

    D:\Qt1\4.4.3>
    please tell me what is the problem

Similar Threads

  1. Qssl
    By tpthyd in forum Qt Programming
    Replies: 16
    Last Post: 15th June 2009, 10:53
  2. Qt4.4 QSsl Won't Compile with MSVC2008
    By Surye in forum Installation and Deployment
    Replies: 2
    Last Post: 9th May 2008, 18:52

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.