olm/src
Denis Kasak 0a8bbde361 Support building a "disarmed" target via the OLM_FUZZING macro.
Like other crypto libs, libolm contains many obstacles which a fuzzer is
unlikely to be able to surmount but which are not important for the end
goal of fuzzing. The easiest and most robust way around this is to remove
these obstacles conditionally when building the fuzzer binaries.

This commit adds a preprocessor macro OLM_FUZZING which can be used to
conditionally disables problematic bits of code during compile-time for
easier fuzzing.

Currently the only thing it disables is the encryption/decryption and
base64 encoding/decoding when processing pickled Megolm keys. This
allows the fuzzers to fuzz the unpickling functionality directly without
inadvertently fuzzing the base64 encoder and encryption (which should be
fuzzed separately).

The macro is set in the Makefile *only* when building fuzzer binaries.
2021-07-13 13:51:16 +02:00
..
account.cpp make functions const where possible 2021-06-16 23:22:25 -04:00
base64.cpp Fail decoding base64 of invalid length. 2021-05-24 15:50:14 +02:00
cipher.cpp fix a length check and add some missing length checks 2018-06-27 12:14:19 -04:00
crypto.cpp Convert AES functions to plain C 2016-09-05 10:40:39 +01:00
ed25519.c Fix Ed25519 keypair generation 2016-09-01 13:35:23 +01:00
error.c SAS: add olm_sas_is_their_key_set 2020-09-23 15:27:55 -04:00
inbound_group_session.c add functions to get the error codes rather than error strings 2021-06-16 22:40:14 -04:00
megolm.c Add a comment explaining Mark's latest fix 2016-05-25 15:44:39 +01:00
memory.cpp C binding for olm::unset 2016-05-23 18:55:05 +01:00
message.cpp olm: Also initialize all fields when decoding Olm messages. 2021-05-11 13:32:23 +02:00
olm.cpp make functions const where possible 2021-06-16 23:22:25 -04:00
outbound_group_session.c Support building a "disarmed" target via the OLM_FUZZING macro. 2021-07-13 13:51:16 +02:00
pickle.cpp Convert ed25519 pickling functions to C 2016-09-05 12:59:12 +01:00
pickle_encoding.c Return the base64-encoded length of pickles 2016-10-24 10:06:06 +01:00
pk.cpp make functions const where possible 2021-06-16 23:22:25 -04:00
ratchet.cpp make functions const where possible 2021-06-16 23:22:25 -04:00
sas.c make functions const where possible 2021-06-16 23:22:25 -04:00
session.cpp make functions const where possible 2021-06-16 23:22:25 -04:00
utility.cpp make functions const where possible 2021-06-16 23:22:25 -04:00