[Qt-interest] Qt 4.7, windows and openssl

Andreas Pakulat apaku at gmx.de
Mon Nov 28 19:40:04 CET 2011


On 28.11.11 19:17:09, Cédric Pessan wrote:
> Hi,
> 
> I am currently struggling to make an existing cryptographic module working
> within a QT application. This module is pure C/C++ and only uses openssl. I
> can't really change its behavior as it has to work with an existing server,
> so i have to stick to its specifications. On linux and macosx, i had no
> problem getting it to work. But on windows, that's a whole different story
> :-(
> 
> Maybe i've done something wrong when linking my project. I'm using cmake to
> build it, and linked it with mingw openssl version provided on this page:
> http://www.slproweb.com/products/Win32OpenSSL.html. Here's what happen:
> - if i use the application without the cryptographic module, it works
> - if i use the cryptographic module alone, it works.
> - if i use the cyrptographic module alone and i initialise my QApplication
> it crashes badly and there is no way in the debugger to understand where
> (looks like it crashes in windows dll and the displayed stack is not
> useful).
> 
> It looks like as soon as i use QT and some ssl functions, it crashes.

Did you try only openssl and Qt or openssl+crypto-module and Qt?

> Is it a known problem ? is there an easy workaround ?

If you answer the above with openssl+crypto-module then how could it be a known
problem - nobody here has the crypto-module you have. Once you
eliminated that variable from the equation it should be much easier to
help you. If it turns out to fix the problem, you need to fix the
crypto-module probably.

> I thought about rewriting the classes using only QT and SSL functionalities
> in QT but it looks like not all functions i need exists in QT. For example,
> i can't find a cryptographically secure random such as RAND_bytes in QT (or
> i missed it ?)

Qt has no cryptographic stuff at all, it does use a ssl-library
internally to implement ssl-support for its network library. There's a
Qt based 3rd party framework for various crypto-needs: QCA.

Andreas




More information about the Qt-interest-old mailing list