Skip to content

CryptoLib: Environment & Building

Robert Brown edited this page Sep 20, 2022 · 26 revisions

Environment

CryptoLib is currently being developed on Ubuntu 20.04 and CentOS 8.5 64bit. Dependencies include the essential development tools, such as:

Ubuntu RedHat
cmake cmake
libgcrypt20-devel libgcrypt-devel
python3 python38-devel
pycryptodome pycryptodome
libgpg-error-dev libgpg-error-devel
libmariadb-dev mariadb-devel
libmariadb-dev-compat --
libcurl4-openssl-dev libcurl-devel

Debug and testing require:

  • Python3 development
  • pycryptodome

Building

Build CryptoLib by following these steps:

Clone the CryptoLib repo. Switch to the desired branch. Currently, integration efforts are occurring in the main branch.

  • cd Cryptolib
  • mkdir build
  • cmake ../
  • make
  • make test

Should a debug environment, or the building of encryption tests be necessary. Be sure to have installed Python3 and the required libraries above. The cmake command above can be modified as follows:

  • cmake -DDEBUG=1 -DENCTEST=1 ../

MYSQL Environment:

  • cmake -DMYSQL=1 ../

This can also be combined with -DENCTEST=1 and -DDEBUG=1

Code Coverage:

  • cmake -DMYSQL=1 -DENCTEST=1 -DDEBUG=1 ../
  • make
  • make gcov

This will produce local coverage reports in /build/coverage, with the HTML results within /build/coverage/results/index.html

Cleanup:

  • make clean -- Cleans Build
  • make scrub -- Cleans Code Coverage

The two flags (DEBUG and ENCTEST) can be used simultaneously, or separately.

All Build Flags:

  • DDEBUG -- Enables Debug output
  • DMYSQL -- Enables use of mysql DB
  • DLIBGCRYPT -- Default setting to use LibGCrypt
  • DKMCCRYPTO -- Setting to make use of KMCCrypto
  • DENCTEST -- Used to perform Python testing
  • DCODECOV -- Used for code coverage results
  • DSYSTEM_INSTALL -- System Components
Clone this wiki locally