ARPA2 Common Libraries  2.6.2
Building and Installing the ARPA2 Common Libraries

This is one of the lower and more generic packages in the ARPA2 software stack. You need very little to install it, and it can be easily incorporated in your software too.

Build-Time Dependencies

dot_inline_dotgraph_1.png

Runtime Dependencies

dot_inline_dotgraph_2.png

Installation with CMake

Our primary build platform is CMake. We do have a convenience wrapper Makefile that lets you build and install as you may be accustomed to.

On Debian, you would install dependencies,

apt-get install ragel liblmdb-dev comerr-dev

then checkout the one source-level dependency,

git clone https://gitlab.com/arpa2/arpa2cm.git source-arpa2cm
mkdir build-arpa2cm
cmake -S source-arpa2cm -B build-arpa2cm
make -C build-arpa2cm all install

and then to build the ARPA2 Common Libraries,

git clone https://gitlab.com/arpa2/arpa2common.git source-arpa2common
mkdir build-arpa2common
cmake -S source-arpa2common -B build-arpa2common
make -C build-arpa2common all install

Testing

Assuming you just built with the instructions above, you would

make -C build-arpa2common test

It should ideally end in something like

100% tests passed, 0 tests failed out of 540
Total Test time (real) = 1.66 sec

You might be surprised about >500 tests, but they are simple and run quickly. They are mostly the result of a number of factors that multiply to a large total number. It is useful to see an identity or line number in the end of a test name.

Tools and Programming

Generate keys with src/tool/a2id-keygen. Just give it a file name. You will need to load a key into programs that sign and verify. The test programs use a fixed key in test/id/test.key which is as safe as it is public.

The test/id directoy contains code to cover the entire library API of <arpa2/identity.h>. Read the include file for detailed information, possibly after reading IDENTITY.MD for an introduction. You may like to see test/id/example.c as an example of how to process identities including optional signatures.