aboutsummaryrefslogtreecommitdiff
path: root/python/olm/session.py
AgeCommit message (Collapse)Author
2019-06-20olm: Rename the errors function argument in the decryption functions.Damir Jelić
2019-06-19_compat: Change the to_native_str into a to_unicode_str function.Damir Jelić
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-18olm: Allow decryption functions to define how to handle unicode decode errors.Damir Jelić
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.
2018-10-16overwrite buffers that may contain sensitive dataHubert Chathi
also reduce the amount of memory copying that we do
2018-10-16remove unnecessary comments about not enough randomHubert Chathi
2018-10-15add license headers to python bindingsHubert Chathi
2018-07-18python: Import improved python bindings.Damir Jelić
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-18python: Remove the python bindings.Damir Jelić
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
2017-04-18PEP8 for python bindingsRichard van der Hoff
make the python code adhere to PEP8
2017-04-04Python: Switch to a more general os.urandom for randomness sourceJ08nY
Signed-off-by: Jan Jancar <johny@neuromancer.sk>
2016-10-02fix missing ctypes function signaturesMatthew Hodgson
These missing signatures were causing OSX to truncate 64-bit pointers to 32-bit pointers when calling the missing methods, causing segfaults
2016-05-20Refactor python wrappersRichard van der Hoff
Split the python wrappers into separate modules