Commit graph

962 commits

Author SHA1 Message Date
Denis Kasak
a02f3d9f82 fix: Properly check error conditions for int-returning functions.
OpenSSL functions returning an int like `EVP_PKEY_derive_init` return
non-positive (0 or negative) integers on an error condition, so we need
to check for both.

See e.g. https://www.openssl.org/docs/man1.1.1/man3/EVP_PKEY_derive.html
2021-12-14 21:57:34 +01:00
Denis Kasak
b82dab50c9 feature: Remove support for crypto-algorithms and LibreSSL.
This cuts support for old cryptographic primitives, leaving only OpenSSL
support. ed25519 crypto still uses a vendored ed25519-donna
implementation.
2021-12-14 21:47:11 +01:00
Denis Kasak
5f6e9c5dc5 Use OpenSSL by default in the Makefile build too. 2021-12-14 16:55:00 +01:00
Denis Kasak
08eefffc2d Use OpenSSL by default in the cmake build. 2021-12-14 16:54:42 +01:00
Lukas Lihotzki
b989f35daf Use OpenSSL instead of bundled curve25519-donna if enabled
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>
2021-12-14 16:53:24 +01:00
Lukas Lihotzki
c7039f5e99 Optionally use OpenSSL or LibreSSL instead of bundled crypto-algorithms
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>
2021-12-14 16:53:24 +01:00
Hubert Chathi
797183f27f release 3.2.8 2021-12-13 08:42:39 -05:00
Hubert Chathi
21dc11ecbf update location of Nim binding 2021-12-13 08:42:14 -05:00
Hubert Chathi
8519ce0269 clear out random arrays 2021-12-10 16:15:22 -05:00
Hubert Chathi
c23ce70fc6 improve handling of olm_session_describe when buffer is too short 2021-12-10 16:14:46 -05:00
Hubert Chathi
2dbeea2f1d release 3.2.7 2021-12-06 11:01:21 -05:00
Valere
e854c0f907 Quick fixes 2021-12-02 21:46:32 +00:00
valere
f647747d27 fallback key java bindings 2021-12-02 21:46:32 +00:00
Benjamin Kampmann
f6309f0281 Disable forced exports (introduced in 72b8bf53) for wasm. 2021-12-02 12:27:37 -05:00
Hubert Chathi
4b2f68d11e add missing word 2021-12-01 15:36:46 -05:00
Hubert Chathi
fb162258ab add function to TypeScript declaration 2021-12-01 14:34:41 -05:00
Hubert Chathi
ee76674f03 remove duplicate definition 2021-12-01 14:34:29 -05:00
Damir Jelić
701f9c765d python: Expose the method to forget the old fallback key 2021-11-24 20:06:24 +01:00
Damir Jelić
85a2f47088 python: Use the unpublished fallback key lenght when outputing fallback keys 2021-11-24 20:06:24 +01:00
Damir Jelić
8c62046392 python: Add support to generate fallback keys 2021-11-24 20:06:24 +01:00
Damir Jelić
845e7cb43b python: Remove Python 2 from the makefile 2021-11-24 20:06:24 +01:00
Hubert Chathi
69ca6cd5ca publish to gitlab.matrix.org Maven repository 2021-11-24 16:06:51 +00:00
Benjamin Kampmann
336e1d56a8 disable DEBUG symbols for emscripten build 2021-11-24 10:43:23 -05:00
Hubert Chathi
6f59e16b58 update function documentation 2021-11-23 22:35:10 +00:00
Denis Kasak
5e5e32fe83 fix typo 2021-11-23 22:35:10 +00:00
Hubert Chathi
631f050554 add a test for fallback keys, and clear memory when we forget the old fallback 2021-11-23 22:35:10 +00:00
Hubert Chathi
29e0287ef3 add function to forget the old fallback key 2021-11-23 22:35:10 +00:00
Hubert Chathi
c5eff859cb add JavaScript function for getting unpublished fallback key 2021-11-23 22:35:10 +00:00
Hubert Chathi
4127a84b3d add function for getting length of unpublished fallback keys
and fix a typo
2021-11-23 22:35:10 +00:00
Hubert Chathi
3b6ff327c0 keep testing logs 2021-11-23 22:35:10 +00:00
Hubert Chathi
b989db0117 track if fallback keys were published 2021-11-23 22:35:10 +00:00
Hubert Chathi
5039c0cc3a fix python build 2021-11-19 15:49:12 -05:00
Hubert Chathi
98b8e35a7c fix symbol exporting again 2021-11-19 15:28:43 -05:00
Denis Kasak
2430e9bb9a Add link to the Security Disclosure Policy to the README. 2021-11-19 10:17:37 +00:00
Hubert Chathi
609e7e8d40 make sure we have enough space for the encrypted and encoded version of the junk 2021-11-17 14:18:03 -05:00
Hubert Chathi
06b723db6e add note about telling olm how to find wasm file 2021-11-11 14:05:07 -05:00
Johannes Marbach
bce4f007b1 Use classic instead of semantic import
This replaces the semantic import for the Security framework with a
classic one. Semantic imports are currently not compatible with Kotlin
Multiplatform Mobile projects which makes OLMKit (and consequently
the iOS Matrix SDK) unusable in KMM.

Fixes: https://github.com/matrix-org/olm/issues/67
Signed-off-by: Johannes Marbach <n0-0ne@mailbox.org>
2021-11-08 15:15:46 -05:00
Hubert Chathi
0e7c0a5613 recommend using cmake more strongly 2021-11-02 16:16:07 -04:00
Hubert Chathi
201f139523 also install olm_export.h when using make 2021-11-02 12:49:52 -04:00
Hubert Chathi
03c5523aac fix typo 2021-09-29 18:33:30 -04:00
Hubert Chathi
8656f1463c release 3.2.6 2021-09-16 17:16:56 -04:00
Hubert Chathi
c81dfd0718 fix Python build 2021-09-16 17:06:45 -04:00
Hubert Chathi
4fb723cad3 install the export header too 2021-09-16 15:09:42 -04:00
Hubert Chathi
72b8bf5334 use visibility annotation rather than version file with CMake 2021-09-16 13:45:10 -04:00
Hubert Chathi
904e80b75f release 3.2.5 2021-09-15 19:15:58 -04:00
Onuray Sahin
06407aa08d Generate and retrieve fallback key functions added. 2021-09-14 22:19:13 +00:00
Hubert Chathi
6a63a5bfa9 use full path to externs.js because it's failing to find it 2021-09-14 18:18:26 -04:00
Hubert Chathi
e1aa1b3277 add jOlm binding 2021-08-25 21:50:33 -04:00
Stefan Ceriu
91a619b745 Added ObjC fallbackKey support and updated tests. 2021-08-18 16:44:34 +03:00
Stefan Ceriu
8ddb72cfed Updated podfile and added Xcode schemes for both iOS and macOS. 2021-08-18 16:40:32 +03:00