-
Notifications
You must be signed in to change notification settings - Fork 23
Using the Qt Cryptographic Architecture with Qt5
Jaco Naude edited this page Jan 15, 2014
·
22 revisions
This page contains notes regarding my experience of getting to know and finally using the Qt Cryptographic Architecture (QCA) with a Qt5 application.
The project website is very outdated, but the git repository is up to date and changes are still pushed regularly (as of Jan 2014).
The details in this section are applicable to a 64-bit Windows 7 machine with Q t5.1.0 and MSVC 2012.
- Git clone it from the following repository: git clone git://anongit.kde.org/qca.git
- If you don't have CMake, install it from http://www.cmake.org/. I used CMAKE 2.8.12.
- If you want documentation to be generated which is recommended since the project website is outdated, install Doxygen before running CMake. The doxyfile generated will automatically enable dot graphs for which Graphviz is also required. Furthermore, Latex (I used Miktex distribution) and Ghostscript are required in order to generate the documentation.
- Also, depending on the plugins you want to use, install their dependencies. For the plugin provider of interest here (qca-ossl) the OpenSSL is enough. For Windows, download binaries here. Make sure to download the developer package. I used a package called Win64 OpenSSL v1.0.1f (16Mb). Make sure that you have the 64-bit Visual C++ 2008 Redistributables installed before you try to run the OpenSSL installer.
The steps are (from \INSTALL):
cmake .
make
make install
/sbin/ldconfig, if necessary
- Run CMake on /CMakeLists.txt. The CMake log will have some important information:
- It found Doxygen
- Its being built with Qt5 support.
- It found Open SSL
-- Found Doxygen: d:/tools/doxygen/bin/doxygen.exe (found version "1.8.6")
-- Building with Qt5 support
-- Checking for certstore..
-- Using built in certstore.
-- certstore path: D:/work/software/public/qca/certs/rootcerts.pem
-- mlock(2) does not take a void *
-- Found OpenSSL: optimized;d:/tools/OpenSSL-Win64/lib/VC/ssleay32MD.lib;debug;d:/tools/OpenSSL-Win64/lib/VC/ssleay32MDd.lib;optimized;d:/tools/OpenSSL-Win64/lib/VC/libeay32MD.lib;debug;d:/tools/OpenSSL-Win64/lib/VC/libeay32MDd.lib (found version "1.0.0l")
-- Looking for EVP_md2
-- Looking for EVP_md2 - not found
-- Looking for EVP_aes_128_ctr
-- Looking for EVP_aes_128_ctr - not found
-- Configuring done
-- Generating done
-- Build files have been written to: D:/work/software/public/qca-build
- Next run make.
- The dlls were not all placed in the expected /build_dir/bin folder:
- qca(d).dll is placed in /build_dir/src
- qca-ossl(d).dll is placed in /build_dir/lib/qca/crypto
- To generate the documentation, I had to edit the generated doxyfile.ini by replacing @CMAKE_SOURCE_DIR@ with the path to the QCA repository. To start generation, just run "doxygen doxyfile.in".
- To test if the build was successful, run the qcatool.exe in /build_dir/bin. Running "qcatool plugins will provide information about available providers:
Qt Library Paths:
D:/tools/qt/Qt5.1.0/5.1.0/msvc2012_64/plugins
D:/work/software/public/qca-build/bin
Available Providers:
(none)