| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 3 | |
Hi all, Is there any ready-to-use https support plugin for Qt now? I have browsed some past threads and read that people often used openSSL directly. I have also found Qt Cryptographic Architecture (QCA), but it has been a long time since its last release. I'm afraid it cannot work properly with Qt 4.2 :-( Is there any better way to handle it now? QtSSLSocket is not a candidate as I am working on an OSS :-) Any suggestions would be very appreciated. Thank. -- [ signature omitted ]
> -----Oorspronkelijk bericht----- > Van: YUAN Jue [mailto:yuanjue02@xxxxxxxxx] > Verzonden: maandag 11 december 2006 13:13 > Is there any ready-to-use https support plugin for Qt now? I have > browsed some past threads and read that people often used openSSL > directly. I have also found Qt Cryptographic Architecture (QCA), but > it has been a long time since its last release. I'm afraid it cannot > work properly with Qt 4.2 :-( since qca is still in active development (http://websvn.kde.org/trunk/kdesupport/qca/) and is still used by Psi (which compiles on qt4), I have a strong feeling it will also work properly with qt4.2 :) matthias -- [ signature omitted ]
On Monday 11 December 2006 23:13, YUAN Jue wrote: > Hi all, > > Is there any ready-to-use https support plugin for Qt now? I have > browsed some past threads and read that people often used openSSL > directly. I have also found Qt Cryptographic Architecture (QCA), but > it has been a long time since its last release. I'm afraid it cannot > work properly with Qt 4.2 :-( As Matthias has pointed out, QCA is being developed actively in KDE's subversion repository, and it does have SSL/TLS (aka https if you ship http over it, no direct support). We are planning to do beta3 soon. In the mean time, you can check out from svn (an example method is provided at http://wiki.kde.org/tiki-index.php?page=Kopete%20Setup%20KDE4DevEnv, but there are a lot of other ways to build it, including using qconf) or you try beta2: http://delta.affinix.com/download/qca/2.0/beta2/ Brad
Attachment:
Attachment:
pgpNevu29aGxY.pgp
Attachment:
Attachment:
pgpkPmYuepBsx.pgp
Attachment:
Attachment:
pgp7OCoPndBkA.pgp
Attachment:
Attachment:
pgpIwju6LvFfn.pgp
Description: PGP signature
Message 4 in thread
Hi Brad,
On 12/12/06, Brad Hards <bradh@xxxxxxxxxxxxx> wrote:
> On Monday 11 December 2006 23:13, YUAN Jue wrote:
> > Hi all,
> >
> > Is there any ready-to-use https support plugin for Qt now? I have
> > browsed some past threads and read that people often used openSSL
> > directly. I have also found Qt Cryptographic Architecture (QCA), but
> > it has been a long time since its last release. I'm afraid it cannot
> > work properly with Qt 4.2 :-(
> As Matthias has pointed out, QCA is being developed actively in KDE's
> subversion repository, and it does have SSL/TLS (aka https if you ship http
> over it, no direct support).
>
> We are planning to do beta3 soon. In the mean time, you can check out from svn
> (an example method is provided at
> http://wiki.kde.org/tiki-index.php?page=Kopete%20Setup%20KDE4DevEnv, but
> there are a lot of other ways to build it, including using qconf) or you try
> beta2:
> http://delta.affinix.com/download/qca/2.0/beta2/
>
I have downloaded qca-beta2 from the above link. After applying some
necessary modification, I could build qca-beta2 successfully. But when
trying to compile qca-openssl so that I could test the example
ssltest, I got an error said: "qca-openssl.cpp:6010: Error: Undefined
interface". don't know what to do with it. I am not familiar with the
Qt plugin thing currently :-(
BTW: I am testing all about this under Windows, using Qt 4.2.2 open
source edition.
Any ideas would be very appreciated :-)
--
[ signature omitted ]
Message 5 in thread
> -----Oorspronkelijk bericht-----
> Van: YUAN Jue [mailto:yuanjue02@xxxxxxxxx]
> Verzonden: dinsdag 12 december 2006 15:48
<cut>
> I have downloaded qca-beta2 from the above link. After applying some
> necessary modification, I could build qca-beta2 successfully. But when
> trying to compile qca-openssl so that I could test the example
> ssltest, I got an error said: "qca-openssl.cpp:6010: Error: Undefined
> interface". don't know what to do with it. I am not familiar with the
> Qt plugin thing currently :-(
my first guess would be that you didn't install and configure openssl?
greets
matthias
--
[ signature omitted ]
Message 6 in thread
Hi,
On 12/12/06, Matthias Sweertvaegher
<matthias.sweertvaegher@xxxxxxxxxxxxxxxxx> wrote:
>
>
> > -----Oorspronkelijk bericht-----
> > Van: YUAN Jue [mailto:yuanjue02@xxxxxxxxx]
> > Verzonden: dinsdag 12 december 2006 15:48
>
> <cut>
>
> > I have downloaded qca-beta2 from the above link. After applying some
> > necessary modification, I could build qca-beta2 successfully. But when
> > trying to compile qca-openssl so that I could test the example
> > ssltest, I got an error said: "qca-openssl.cpp:6010: Error: Undefined
> > interface". don't know what to do with it. I am not familiar with the
> > Qt plugin thing currently :-(
>
> my first guess would be that you didn't install and configure openssl?
>
I install openssl binary package 0.98d via
http://www.slproweb.com/products/Win32OpenSSL.html, and I modified
qca-openssl.pro like the following:
#CONFIG += release
CONFIG += debug
TEMPLATE = lib
CONFIG += plugin
QT -= gui
CONFIG += crypto
SOURCES = qca-openssl.cpp
#SOURCES += main.cpp
windows:{
# hardcoded openssl location
OPENSSL_PREFIX = c:\OpenSSL
DEFINES += OSSL_097
INCLUDEPATH += $$OPENSSL_PREFIX\include\openssl
LIBS += -L$$OPENSSL_PREFIX\lib\Builder5
LIBS += -llibeay32 -lssleay32
LIBS += -lgdi32 -lwsock32
}
include(conf.pri)
after all of these, "qca-openssl.cpp:6010: Error: Undefined > >
interface" is the error I got :-(
Anything else I missed?
--
[ signature omitted ]
Message 7 in thread
> -----Oorspronkelijk bericht-----
> Van: YUAN Jue [mailto:yuanjue02@xxxxxxxxx]
> Verzonden: dinsdag 12 december 2006 17:14
> > my first guess would be that you didn't install and
> > configure openssl?
> >
> I install openssl binary package 0.98d via
> http://www.slproweb.com/products/Win32OpenSSL.html, and I modified
> qca-openssl.pro like the following:
> #CONFIG += release
> CONFIG += debug
>
> TEMPLATE = lib
> CONFIG += plugin
> QT -= gui
> CONFIG += crypto
>
> SOURCES = qca-openssl.cpp
> #SOURCES += main.cpp
>
> windows:{
> # hardcoded openssl location
> OPENSSL_PREFIX = c:\OpenSSL
> DEFINES += OSSL_097
>
> INCLUDEPATH += $$OPENSSL_PREFIX\include\openssl
> LIBS += -L$$OPENSSL_PREFIX\lib\Builder5
> LIBS += -llibeay32 -lssleay32
> LIBS += -lgdi32 -lwsock32
> }
>
> include(conf.pri)
>
> after all of these, "qca-openssl.cpp:6010: Error: Undefined > >
> interface" is the error I got :-(
I can only tell you what I have done myself, which was following
the psi build document. I do seem to remember this error though,
so you could check up with this:
"
Building the QCA OpenSSL plugin
-------------------------------
* Go to the dir where you unpacked OpenSSL. In the lib\MingW subdir of
that dir, copy the
files ssleay32.a and libeay32.a to ssleay32.lib and libeay32.lib
respectively.
* Edit qca-openssl.pro, and change the OPENSSL_PREFIX in
the windows section to point to the dir where you installed OpenSSL
(e.g. C:/OpenSSL).
Change -L$$OPENSSL_PREFIX/lib into -L$$OPENSSL_PREFIX/lib/MingW.
* Run the following commands:
qmake
mingw32-make
"
I followed this advice with succesful result on windows with qt4.2 and
mingw32
It seems you are using builder5 libs..?
greets
matthias
--
[ signature omitted ]
Message 8 in thread
On Wednesday 13 December 2006 01:47, YUAN Jue wrote:
> I have downloaded qca-beta2 from the above link. After applying some
> necessary modification, I could build qca-beta2 successfully. But when
> trying to compile qca-openssl so that I could test the example
> ssltest, I got an error said: "qca-openssl.cpp:6010: Error: Undefined
> interface". don't know what to do with it. I am not familiar with the
> Qt plugin thing currently :-(
>
> BTW: I am testing all about this under Windows, using Qt 4.2.2 open
> source edition.
I'm not familiar with building anything on Windows. Undefined interface sound
kind-of like a missing header or library, so I can only second Matthias'
comments about a bad installation of Openssl.
Brad
Description: PGP signature
Message 9 in thread
Hi,
On 12/13/06, Brad Hards <bradh@xxxxxxxxxxxxx> wrote:
> On Wednesday 13 December 2006 01:47, YUAN Jue wrote:
> > I have downloaded qca-beta2 from the above link. After applying some
> > necessary modification, I could build qca-beta2 successfully. But when
> > trying to compile qca-openssl so that I could test the example
> > ssltest, I got an error said: "qca-openssl.cpp:6010: Error: Undefined
> > interface". don't know what to do with it. I am not familiar with the
> > Qt plugin thing currently :-(
> >
> > BTW: I am testing all about this under Windows, using Qt 4.2.2 open
> > source edition.
> I'm not familiar with building anything on Windows. Undefined interface sound
> kind-of like a missing header or library, so I can only second Matthias'
> comments about a bad installation of Openssl.
>
"Build Instructions Qt4" on Psiwiki does help. I also buid qca2.dll
and qca-openssl.dll successfully following that link, and then my
program which use TLS for communication works. Big thanks :-)
However, I have got another strange problem: my program now could only
work properly on my own PC, when TLS support is added via QCA. In
anyone else's computer, it just crashes. I have also test ssltest, the
example provided by QCA. That program works well on my computer, but
when running in other men's computers, it says "TLS not supported!".
I am sure I have put qca-openssl.dll within a subdirectory named
"crypto". Without this is the reason that I got the "TLS not
supported" error on my computer, but with this subdir and dll,
everything works well. Besides, I also uninstall OpenSSL on my
computer to test, and it seems has nothing to do with it.
Any ideas about this?
Thanks in advance :-)
--
[ signature omitted ]
Message 10 in thread
On Friday 15 December 2006 02:24, YUAN Jue wrote:
> However, I have got another strange problem: my program now could only
> work properly on my own PC, when TLS support is added via QCA. In
> anyone else's computer, it just crashes. I have also test ssltest, the
> example provided by QCA. That program works well on my computer, but
> when running in other men's computers, it says "TLS not supported!".
> I am sure I have put qca-openssl.dll within a subdirectory named
> "crypto". Without this is the reason that I got the "TLS not
> supported" error on my computer, but with this subdir and dll,
> everything works well. Besides, I also uninstall OpenSSL on my
> computer to test, and it seems has nothing to do with it.
Use the "qcatool" application, and verify what happens when you run
"qcatool --plugins -d". Read the output closely - it will tell you which
directories are being searched, and what the outcome of loading is.
Brad
Description: PGP signature
Message 11 in thread
Hi,
On 12/15/06, Brad Hards <bradh@xxxxxxxxxxxxx> wrote:
> On Friday 15 December 2006 02:24, YUAN Jue wrote:
> > However, I have got another strange problem: my program now could only
> > work properly on my own PC, when TLS support is added via QCA. In
> > anyone else's computer, it just crashes. I have also test ssltest, the
> > example provided by QCA. That program works well on my computer, but
> > when running in other men's computers, it says "TLS not supported!".
> > I am sure I have put qca-openssl.dll within a subdirectory named
> > "crypto". Without this is the reason that I got the "TLS not
> > supported" error on my computer, but with this subdir and dll,
> > everything works well. Besides, I also uninstall OpenSSL on my
> > computer to test, and it seems has nothing to do with it.
> Use the "qcatool" application, and verify what happens when you run
> "qcatool --plugins -d". Read the output closely - it will tell you which
> directories are being searched, and what the outcome of loading is.
>
OK. I think I have found where the problem is. It seems libeay32.dll
and ssleay32.dll are needed to get the plugin working. Typically these
dlls are in WINDOWS/system32/ if one have installed OpenSSL or
something else. So I just copy both of them to my program directory,
and now it could works on everyone's computer.
Thanks very much for this useful plugin. :-)
PS: to make the whole qca-2.0-beta2 built successfully, one need to
manually change "-lqca" to "-lqca2". This change should be applied to
examples\examples.pri and all .pro files within unittest subdirectory.
Seems this situation still exists in kdesupport/qca
--
[ signature omitted ]
Message 12 in thread
On Friday 15 December 2006 02:24, YUAN Jue wrote:
> However, I have got another strange problem: my program now could only
> work properly on my own PC, when TLS support is added via QCA. In
> anyone else's computer, it just crashes. I have also test ssltest, the
> example provided by QCA. That program works well on my computer, but
> when running in other men's computers, it says "TLS not supported!".
I should have pointed this out earlier: if your program segfaults, it is a bug
in your code. You must test if you have the right plugins before trying to
use the capability, using QCA::isSupported("tls") for TLS. Don't assume the
plugin is available, and make sure your code can handle the case where the
plugin isn't available.
Brad
Description: PGP signature