Commit Graph

77 Commits (emscripten-backport)

Author SHA1 Message Date
Hubert Chathi 7bf6fb553e improve documentation for Python function 2022-05-02 12:12:31 -04:00
Hubert Chathi 1c7df35c5f exposed olm_sas_calculate_mac_fixed_base64 in the bindings 2022-04-21 21:45:19 -04:00
Hubert Chathi 2f23d99424 Release 3.2.11 2022-04-08 16:00:24 -04:00
Benoit Marty 9908862979 release 3.2.10 2022-01-10 11:00:49 +01:00
Hubert Chathi 0dde38bd4f release 3.2.9 2022-01-07 10:56:06 -05:00
Tulir Asokan 9946acac23 Add Python wrapper for olm_session_describe
Signed-off-by: Tulir Asokan <tulir@beeper.com>
2022-01-03 09:43:21 +00:00
Hubert Chathi 797183f27f release 3.2.8 2021-12-13 08:42:39 -05:00
Hubert Chathi 2dbeea2f1d release 3.2.7 2021-12-06 11:01:21 -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
Hubert Chathi 8656f1463c release 3.2.6 2021-09-16 17:16:56 -04:00
Hubert Chathi 904e80b75f release 3.2.5 2021-09-15 19:15:58 -04:00
Hubert Chathi 64afab9364 prepare for release 2021-06-01 13:44:45 -04:00
Hubert Chathi 22bc1155ed prepare for release 2021-05-24 10:29:24 -04:00
Hubert Chathi 3745ea57bb bump version number and add changelog 2021-02-22 17:06:13 -05:00
Hubert Chathi c4d737c86c bump version numbers and update changelog 2020-10-06 17:39:48 -04:00
Hubert Chathi 4d17aa4f05 bump version numbers and update changelog 2020-10-06 15:08:10 -04:00
Hubert Chathi 0e6ec3062d remove other_key checks from Python binding since it's done in C now 2020-09-24 18:56:19 +00:00
Hubert Chathi 8a958beb48 bump version info for release 2020-06-11 11:47:50 -04:00
Hubert Chathi 6753595300 release 3.1.4 2019-10-09 12:33:47 -04:00
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ć 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
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
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
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 769d013ef7 release 3.1.2 2019-04-30 18:25:21 -04:00
Hubert Chathi 6aafd69f8f bump version number for 3.1.1 2019-04-29 15:01:09 -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 107adba241 isort python/olm/pk.py 2019-04-12 13:02:57 -04:00
Damir Jelić 32b99b7935 python: Add support for the long KDF MAC calculation. 2019-04-09 10:57:36 +02:00
Damir Jelić 659eb34fa4 python: Remove an unneeded and old copyright header. 2019-04-09 10:47:26 +02:00
Hubert Chathi 74e9300daf add python bindings for PK signing 2019-04-08 17:19:47 -04:00
Hubert Chathi 2a6400716c
Merge branch 'master' into poljar/python-sas 2019-04-08 15:08:17 -04:00
Damir Jelić f160d693b6 python: Add PK bindings.
This patch adds bindings to the PK part of the Olm library contained in
the pk.h header file.

Encryption, decryption as well as pickling/unpickling of the decryption
object is supported.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-08 15:04:32 -04:00
Damir Jelić fcfa5f12a4 python: Expose the sha256() function in the utilities.
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-02 12:56:59 +02:00
Damir Jelić 446628753b python: Add Short Authentication String bindings.
This patch adds bindings to the SAS part of the Olm library contained in
the sas.h header file.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-04-02 12:56:53 +02:00
Damir Jelić 45091c158d python: Turn the signature buffer into a bytearray.
This is a workaround for a bug where signature verification would
overwrite the variable holding the signature.

This only happens on python2.

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2019-01-23 17:10:44 -05:00
Hubert Chathi ff24af601a prepare release 3.0.0 2018-10-23 12:58:10 -04:00
Hubert Chathi 0ec6a65858 add more buffer clearing 2018-10-16 15:59:32 -04:00
Hubert Chathi 5ef6a844d6 overwrite buffers that may contain sensitive data
also reduce the amount of memory copying that we do
2018-10-16 00:31:56 -04:00
Hubert Chathi 357d4ff479 remove unnecessary comments about not enough random 2018-10-16 00:04:45 -04:00
Hubert Chathi 019ff702a0 add license headers to python bindings 2018-10-15 13:54:14 -04:00
Damir Jelić e3d6673371 python: Import improved python bindings.
This commit imports the python bindings from:
    https://github.com/poljar/python-olm

The bindings are imported at commit c44b145818520d69eaaa350fb95afcb846125e0f

Minor modifications were made while importing:
    - Removed travis config
    - Removed Arch Linux PKGBUILD
    - Removed the html docs, they can be rebuild by running make html in
      the docs folder
    - Slightly modified the README

The new bindings feature some improvements over the old ones:
    - Python 2 and 3 support
    - Automatic memory management
    - Automatic memory clearing before it is freed
    - Type signatures via the python typing module
    - Full test coverage
    - Properties are utilized where it makes sense (e.g. account.id)

Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2018-07-18 17:44:32 -04:00
Damir Jelić 2fccf44015 python: Remove the python bindings.
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2018-07-18 17:44:32 -04:00