Commit graph

1015 commits

Author SHA1 Message Date
Hubert Chathi
ebd3ba6cc1 release 3.1.3 2019-06-24 17:09:41 -04:00
Matthew Hodgson
ae38f2c5a0 Merge branch 'python/unicode_decode_errors' into 'master'
Python unicode decode errors when decrypting.

See merge request matrix-org/olm!4
2019-06-22 17:06:02 +00:00
Damir Jelić
61175c969b tests: Simplify the input parameter for the Unicode decoding tests. 2019-06-20 14:08:21 +02:00
Damir Jelić
28350d612e tests: Use Unicode literals in the Unicode decoding tests.
This is needed because the function returns Unicode strings and the
comparison will fail under python2 unless Unicode literals are used.
2019-06-20 14:07:14 +02:00
Damir Jelić
5d7070d2f3 tests: Simplify the sha256 tests for python.
Hypothesis isn't used anymore and the strings are now constants, meaning
that the hashes should never match.
2019-06-20 13:55:03 +02:00
Damir Jelić
125c62098c tests: Drop hypothesis from the tests.
Hypothesis recently had some problems with the typing module breaking
the tox tests.

Since Hypothesis isn't really used much in the test this patch removes
it from them as well as from the test-requirements.
2019-06-20 13:45:33 +02:00
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