spank-olm

WIP Do not look
git clone git://archive.git.mtrnord.blog/MTRNord/spank-olm.git
Log | Files | Refs | README | LICENSE

commit 9da3e999295e79228f3d214885354bbe464c50a3
parent b34e2f0bc86bc15047174d4f8571dfd547879ee2
Author: MTRNord <mtrnord1@gmail.com>
Date:   Wed,  7 Aug 2024 17:04:10 +0200

Add readme and build pkg-config file

Diffstat:
AREADME.md | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mmeson.build | 21+++++++++++++++++++++
Amisc/spank-olm.pc.in | 11+++++++++++
3 files changed, 98 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,65 @@ +# spank_olm + +[![GitHub](https://img.shields.io/github/license/MTRNord/spank_olm)](https://github.com/MTRNord/spank_olm/blob/main/LICENSE) + +## Overview + +`spank_olm` is a C++ library based on the [libolm](https://gitlab.matrix.org/matrix-org/olm) library +from [matrix.org](https://matrix.org). It aims to provide cryptographic functionalities similar to libolm but is not +intended for production use. The library has not undergone any security audits. + +## Features + +- Cryptographic operations based on libolm +- Fuzzing support for enhanced security testing +- Uses Botan3 as the cryptographic backend + +## Installation + +To install `spank_olm`, clone the repository and build it using Meson. + +```sh +git clone https://github.com/MTRNord/spank_olm.git +cd spank_olm +meson setup build +meson compile -C build +``` + +To build shared libraries: + +```sh +meson setup build_shared --default-library=shared +meson compile -C build_shared +``` + +To build static libraries: + +```sh +meson setup build_static --default-library=static +meson compile -C build_static +``` + +## Usage + +Include `spank_olm` in your C++ project and link against it. Refer to the source code for examples of how to use the +library's functionalities. + +## Fuzzing + +Fuzzing is a key goal for this project. The repository includes a GitHub Actions workflow for running fuzz tests using +ClusterFuzzLite. + +## License + +This project is licensed under the GNU Affero General Public License, Version 3. See +the [LICENSE](https://github.com/MTRNord/spank_olm/blob/main/LICENSE) file for details. + +## Disclaimer + +- This library is not production-ready. +- No security audit has been performed. +- Tests are available but not yet set up on CI. + +## Contributing + +Contributions are welcome! Please open issues and pull requests as needed. +\ No newline at end of file diff --git a/meson.build b/meson.build @@ -33,6 +33,27 @@ spank_olm_dep = declare_dependency( dependencies : spank_olm_deps, ) +# Generate and install pkg-config file +pkgconfig = { + 'prefix' : get_option('prefix'), + 'libdir' : get_option('libdir'), + 'includedir' : join_paths(get_option('prefix'), get_option('includedir')), + 'name' : 'spank-olm', + 'description' : 'A C++ library based on libolm', + 'version' : meson.project_version(), + 'requires' : 'botan-3', + 'libs' : '-L${libdir} -lspank_olm', + 'cflags' : '-I${includedir}/spank-olm' +} + +configure_file( + input : 'misc/spank-olm.pc.in', + output : 'spank-olm.pc', + configuration : pkgconfig, + install : true, + install_dir : join_paths(get_option('libdir'), 'pkgconfig') +) + if get_option('build_tests') snitch_dep = dependency('snitch') diff --git a/misc/spank-olm.pc.in b/misc/spank-olm.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: @name@ +Description: @description@ +Version: @version@ +Requires: @requires@ +Libs: @libs@ +Cflags: @cflags@ +\ No newline at end of file