Problem using RSA algorythme in QCA
-
I want my application to be supported by other systems of exploitation such as Mac OS, Windows.
If the method that you can offer me that the application can be compiled on other OS without installing qca-ssl, how can make the connection? IHow can I link against QCA library and allow it to load the plugins?
-
So you just ship the QCA lib and qca-ossl plugin (and openssl of course) with your application on those platforms. We do it with out any problems on Linux and Windows.
You can put the qca2.dll and the OpenSSL dll's (libeay32.dll, ssleay32.dll, libssl32.dll) into the install dir next to your application. The qca-ossl is a plugin and should be put into a subdir called crypto in order for the plugin system to be able to find it at runtime.
I would not bother trying to compile qca and qca-ossl directly into your application.
HTH
-
I joined the sources of qca-ossl in my project, but there are files of openssl that are imported in the file qca-ossl.cpp, but the application does not see them. Do I have to integrate the sources of openssl in my project?
At the instruction: INSTALL (TARGETS qca-ossl LIBRARY DESTINATION $ {qca_PLUGINSDIR} ) I changed by putting: INSTALL (TARGETS qca-ossl LIBRARY DESTINATION / usr / share / monRep). Because he could not find the directory $ {qca_PLUGINSDIR}
This is the CMakeList.txt of the qca-ossl:
@########################################################################################
########################################################################################CMAKE PROJECT
########################################################################################
########################################################################################
PROJECT (QCA_OSSL)cmake_minimum_required( VERSION 2.6 )
SET(QCA_OSSL_SOURCES qca-ossl.cpp)
#MY_AUTOMOC( QCA_OSSL_SOURCES )
ADD_LIBRARY(qca-ossl SHARED ${QCA_OSSL_SOURCES})
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(qca-ossl ${QT_QTCORE_LIBRARY})
TARGET_LINK_LIBRARIES(qca-ossl qca)
TARGET_LINK_LIBRARIES(qca-ossl ${OPENSSL_LIBRARIES})
if(APPLE)
TARGET_LINK_LIBRARIES(qca-ossl crypto)
endif(APPLE)
IF (WIN32)
ADD_DEFINITIONS(-DOSSL_097)
TARGET_LINK_LIBRARIES(qca-ossl gdi32)
TARGET_LINK_LIBRARIES(qca-ossl wsock32)
TARGET_LINK_LIBRARIES(qca-ossl ${OPENSSL_EAY_LIBRARIES})
ENDIF (WIN32)INSTALL(TARGETS qca-ossl LIBRARY DESTINATION ${qca_PLUGINSDIR})@
When I execute my application I have the error message
@[ 98%] Building CXX object composants/qca-ossl-0.1/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o
In file included from /usr/include/QtCrypto/qca.h:36:0,
from /usr/include/QtCrypto/QtCrypto:1,
from /home/sfaye/Qt/in-tactick/int-tactic/xsimul/trunk/sources/composants/qca-ossl-0.1/qca-ossl.cpp:21:
/usr/include/QtCrypto/qca_core.h:45:19: erreur fatale: QString : Aucun fichier ou dossier de ce type
compilation terminée.
make[2]: *** [composants/qca-ossl-0.1/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o] Erreur 1
make[1]: *** [composants/qca-ossl-0.1/CMakeFiles/qca-ossl.dir/all] Erreur 2
make: *** [all] Erreur 2
Le processus "/usr/bin/make" s'est terminé avec le code 2.@
Help please. -
Once again, please be patient. 1 hour is not enough time for people to see your question and get a response. Please wait longer before bumping a thread.
Why do you not just try it the way we suggested? ie Build qca and qca-ossl normally then ship them with your executable?
As for your specific question, of course qca-ossl requires headers form openssl. It is wrapping the openssl functionality. So you will need to have the openssl headers in a path searched by the compiler. You will still need to deploy the openssl libs anyway - unless you plan on integrating those into your project too?!?!
-
-
I'll leave Volker to answer for the Mac side of things but on Windows I use NSIS to build an installer. I've already told you how to structure your installation dir on Windows but here it is again:
@
$INSTALLDIR
$INSTALLDIR/application.exe
$INSTALLDIR/$QTLIBS
$INSTALLDIR/{libeay32.dll, ssleay32.dll, libssl32.dll}
$INSTALLDIR/qca2.dll
$INSTALLDIR/crypto/qca-ossl.dll
@This really is much less work than trying to compile all of these projects into your application.