Qca-2.1.0

Introduction to Qca

Qca aims to provide a straightforward and cross-platform crypto API, using Qt datatypes and conventions. Qca separates the API from the implementation, using plugins known as Providers.

This package is known to build and work properly using an LFS-7.7 systemd platform.

Package Information

Qca Dependencies

Required

CMake-3.1.3 and Qt-4.8.6

Recommended

Optional

Cyrus SASL-2.1.26, GnuPG-2.0.26, libgcrypt-1.6.2, NSS-3.17.4, OpenSSL-1.0.2, Qt-5.4.0, Botan and pkcs11-helper

[Note]

Note

Even though this package can be built against Qt5, the instructions below don't cover such installation because the changes needed to the instructions below are too invasive. If you need Qt5 version of the library, check the "KDE Frameworks 5" chapter for instructions.

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/qca

Installation of Qca

First, silence a lot of warnings caused by using the latest toolchain by running the following command:

sed -i "/BSD_SOURCE/d" CMakeLists.txt

Install Qca by running the following commands:

mkdir build &&
cd    build &&

cmake -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release  \
      -DQT4_BUILD=ON              \
      -DQCA_DOC_INSTALL_DIR=/usr/share/doc/qca-2.1.0            \
      -DQCA_FEATURE_INSTALL_DIR=/usr/share/qt4/mkspecs/features \
      -DQCA_INCLUDE_INSTALL_DIR=/usr/include/qt4                \
      -DQCA_PRIVATE_INCLUDE_INSTALL_DIR=/usr/include/qt4        \
      -DQCA_PLUGINS_INSTALL_DIR=/usr/lib/qt4/plugins            \
      -Wno-dev .. &&

make

To test the results, issue make test.

Now, as the root user:

make install

If Qt4 isn't installed in /usr, ensure it can properly find the modules installed by this package by running the following commands as the root user:

if [[ ${QT4DIR} != "/usr" ]]
then
   ln -sfv /usr/include/qt4/QtCrypto                  \
           ${QT4DIR}/include/qt4/                     &&
   ln -sfv /usr/share/qt4/mkspecs/features/crypto.prf \
           ${QT4DIR}/share/qt4/mkspecs/features/      &&

   install -v -dm755 ${QT4DIR}/lib/qt4/plugins/crypto &&

   for file in /usr/lib/qt4/plugins/crypto/*
   do
       ln -sfv ${file} ${QT4DIR}/lib/qt4/plugins/crypto/
   done &&

   unset file
fi
[Note]

Note

If you upgrade Qt4 per BLFS instructions, make sure you re-run the commands above.

Command Explanations

-DCMAKE_BUILD_TYPE=Release: This switch is used to apply higher level of the compiler optimizations.

-DQT4_BUILD=ON: This switch is used to ensure that Qt4 version of the library is built even if Qt5 is present.

-DQCA_*_INSTALL_DIR=...: These switches are used to ensure that files depending on the Qt4 installation prefix are installed in the correct locations.

Contents

Installed Programs: mozcerts and qcatool
Installed Libraries: libqca.so
Installed Directories: /usr/include/qt4/QtCrypto, /usr/lib/cmake/Qca, /usr/lib/qt4/plugins/crypto and, depending on the Qt4 installation prefix, $QT4DIR/include/qt4/QtCrypto and $QT4DIR/lib/qt4/plugins/crypto

Short Descriptions

mozcerts

is a command line tool for converting certdata.txt into outfile.pem files.

qcatool

is a command line tool for performing various cryptographic operations with Qca.

libqca.so

is the Qt Cryptography Architecture (Qca) library.

Last updated on 2014-10-26 16:35:43 +0100