-
Notifications
You must be signed in to change notification settings - Fork 46
CryptoLib: Environment & Building
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
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