Commit graph

859 commits

Author SHA1 Message Date
Damir Jelić
c4d703ac3d _compat: Make the encoding argument explicit in to_unicode_str(). 2019-06-20 12:24:08 +02:00
Damir Jelić
7538a1eccf olm: Rename the errors function argument in the decryption functions. 2019-06-20 12:16:37 +02:00
Matthew Hodgson
25662564d4 Merge branch 'matthew/define-secrecy' into 'master'
explicitly define backward & forward secrecy

See merge request matrix-org/olm!3
2019-06-19 23:25:56 +00:00
Matthew Hodgson
cfd1450b0e fix typo & more wording from luca 2019-06-20 00:21:47 +01:00
Damir Jelić
fec41f9540 _compat: Remove the now unused native_str. 2019-06-19 15:07:14 +02:00
Damir Jelić
5e24c605d2 _compat: Change the to_native_str into a to_unicode_str function.
The to_native_str function was supposed to produce Unicode decoded
native strings for python2 and python3.

Upon further consideration this doesn't make much sense since under
python2 it would need to decode the bytes into a Unicode string and turn
it back into a python2 str.

The ability to use the replacement character requires us to use a
Unicode string under python2 as well.
2019-06-19 15:03:57 +02:00
Damir Jelić
ba65551d5f _compat: Remove unused import. 2019-06-19 14:42:58 +02:00
Matthew Hodgson
27f5c25fe8 incorporate review from vdh & luca 2019-06-18 23:47:42 +01:00
Damir Jelić
9faa100c6a Makefile: Add an isort target. 2019-06-18 13:52:02 +02:00
Damir Jelić
2f5590bf38 olm: Allow decryption functions to define how to handle unicode decode errors.
This patch changes the decryption functions not to fail if there was an
unicode decode error while converting the decrypted bytes plaintext into
a native python string.

Characters that cannot be decoded as unicode are now replaced with the
unicode replacement character (U+FFFD).

The old behaviour of raising an UnicodeDecodeError can be achieved by
passing the "strict" error handling scheme to the decrypt function.
2019-06-18 13:50:46 +02:00
Matthew Hodgson
f8abaf9e2f explicitly define backward & forward secrecy
as it repeatedly trips people up, including me
2019-06-18 12:45:31 +01:00
Damir Jelić
e1a4e6ebf1 compat: Add a method to convert bytes to a string that handles unicode errors. 2019-06-18 13:44:22 +02:00
Hubert Chathi
4bb039a98e fix another incorrect comment 2019-06-12 16:22:15 -04:00
Hubert Chathi
3ed150edf7 use the right error in the comment 2019-06-12 11:22:28 -04:00
Matthew Hodgson
a18a4e8eb4 remove megolm.rst 2019-05-20 21:39:54 +01:00
Matthew Hodgson
cab1edb6da Merge branch 'markdown' into 'master'
Convert docs from RST to Markdown

See merge request matrix-org/olm!2
2019-05-20 20:38:57 +00:00
Matthew Hodgson
b6cd1690f2 merge 2019-05-20 21:38:16 +01:00
Matthew Hodgson
c368898cef Merge branch 'master' into markdown 2019-05-20 21:38:04 +01:00
Matthew Hodgson
214908ace5 fix thinko in megolm spec
as per https://github.com/matrix-org/olm/issues/15.
thanks to @dest
2019-05-20 21:16:51 +01:00
Hubert Chathi
969c8b45e5 add more consts and comments 2019-05-14 22:02:50 -04:00
Aaron Raimist
5b69a1a5cd Convert CONTRIBUTING.rst to markdown
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-05-14 12:57:54 -04:00
Aaron Raimist
b46ac91928 Convert README.rst to markdown
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-05-14 12:57:48 -04:00
Aaron Raimist
73288e6f2a Convert signing.rst to markdown
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-05-14 12:55:48 -04:00
Aaron Raimist
6a72cfd287 Convert olm.rst to markdown
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-05-14 12:55:44 -04:00
Aaron Raimist
e273189af3 Convert megolm.rst to markdown
Signed-off-by: Aaron Raimist <aaron@raim.ist>
2019-05-14 12:55:40 -04:00
Hubert Chathi
0757e6df40 add comment about input buffers being overwritten
also make some params const where possible
2019-05-14 12:53:19 -04:00
Hubert Chathi
769d013ef7 release 3.1.2 2019-04-30 18:25:21 -04:00
Benoit Marty
69feb86c01 update to newer Android SDK version 2019-04-30 18:22:30 -04:00
Benoit Marty
27fcc337a3 improve some comments 2019-04-30 18:19:26 -04:00
Hubert Chathi
6aafd69f8f bump version number for 3.1.1 2019-04-29 15:01:09 -04:00
Hubert Chathi
38649855f7 avoid variable length arrays in SAS test 2019-04-29 14:49:47 -04:00
Hubert Chathi
af47497ace update changelog for 3.1.1 2019-04-29 14:35:15 -04:00
Hubert Chathi
ba1c20d6b4 disable test_ratchet on dynamically-linked Windows builds 2019-04-29 13:32:46 -04:00
Hubert Chathi
b79c6d6f69 export all symbols for Windows DLLs 2019-04-29 13:11:48 -04:00
Hubert Chathi
099b3ce82a also add SAS to the tests cmake 2019-04-29 11:47:55 -04:00
Hubert Chathi
327d6ac0eb Merge branch 'poljar/cmake_sas' into 'master'
cmake: Add the SAS functions to the CMake build.

See merge request matrix-org/olm!1
2019-04-28 11:35:58 +00:00
Damir Jelić
6eca9f1278 cmake: Add the SAS functions to the CMake build.
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-28 08:55:40 +02:00
Hubert Chathi
992323c37c update changelog 2019-04-22 13:17:30 -04:00
Hubert Chathi
8ec6387615 include the C++ string library in unit tests
to fix compilation errors in some compilers
2019-04-22 13:14:39 -04:00
Hubert Chathi
ea13edcae0 don't use variable length or zero-length arrays in test files
as some compilers don't handle that
2019-04-22 10:12:42 -04:00
Hubert Chathi
157c0fa67e remove some debugging output from tests 2019-04-22 10:11:43 -04:00
Hubert Chathi
5832e85691
Merge pull request #89 from matrix-org/manuroe/cocoapods_update
OLMKit: Make podspec point to new https://gitlab.matrix.org/matrix-org/olm
2019-04-19 08:02:23 -04:00
manuroe
51ce62fce0 OLMKit: Make podspec point to new https://gitlab.matrix.org/matrix-org/olm 2019-04-19 11:59:22 +02:00
Hubert Chathi
009173c1ab update changelog links to point to new repo 2019-04-17 21:09:03 -04:00
Hubert Chathi
bac8ca7802 prepare for 3.1.0 release 2019-04-17 17:31:01 -04:00
Hubert Chathi
0d0169c839
Merge pull request #86 from matrix-org/add_python_pk_signing
add python bindings for PK signing
2019-04-12 19:21:17 -04:00
Hubert Chathi
ab6e8d5086 more isort 2019-04-12 19:17:06 -04:00
Hubert Chathi
b12fe0aeb3
Merge pull request #88 from matrix-org/manuroe/sas_pksigning
OLMKit: add Short Authentication String verification
2019-04-12 19:04:09 -04:00
Hubert Chathi
107adba241 isort python/olm/pk.py 2019-04-12 13:02:57 -04:00
manuroe
5147349fea OLMKit: OMLPkSigning: Zero mutableSeed 2019-04-12 11:17:53 +02:00