This change primarily increases runtime performance. The tests added together
are speed up by about 50%. Additionally, binary size decreases by about 15%.
LibreSSL can't be used because it doesn't provide a function to get
the public key for an existing private key in its openssl/curve25519.h.
Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
crypto-algorithms "have no resistence to side-channel attacks and should not
be used in contexts that need cryptographically secure implementations" (see
lib/crypto-algorithms/README.md), so using OpenSSL or LibreSSL is preferable.
This does solve https://github.com/matrix-org/olm/issues/3 for some platforms,
without breaking other platforms without these libraries (like web).
Signed-off-by: Lukas Lihotzki <lukas@lihotzki.de>
Without that, if olm is installed to a non-standard location, the user code might run CMake configuration fine but further building will fail.
Signed-off-by: Alexey Rusakov <Alexey.Rusakov@pm.me>
The library can now be installed using CMake v3.0+.
Below is an example configuration.
1. Generate configuation
cmake -H. -Bbuild
-GNinja
-DCMAKE_BUILD_TYPE=Release // The default profile.
-DCMAKE_INSTALL_PREFIX=/usr/local/
-DBUILD_SHARED_LIBS=ON
-DOLM_TESTS=1
-DOLM_FUZZERS=1
2. Build & install the targets
cmake --build build --config Release --target install
3. Run the tests
cd build/test && ctest .
The library can also be used as a dependency with CMake using
find_package(Olm::Olm REQUIRED)
target_link_libraries(my_exe Olm::Olm)
Signed-off-by: Konstantinos Sideris <sideris.konstantin@gmail.com>