gpgme/lang
Tobias Mueller bbfa7c4233
python: Fix crash by leaving struct members intact
* lang/python/setup.py.in: Copy gpgme.h instead of parsing it.
--
The python bindings tried to parse deprecated functions
out of gpgme.h. This fails for the current gpgme.h in
that it removes an entire field in the key sig struct (_obsolete_class).
Hence, the fields were off by an int and the bindings accessed struct
members via the wrong offset. That caused python program to crash.
At least on 32bit platforms, the crash can be easily triggered by
accessing key.uids[0].signatures. On 64bit platforms the compiler
probably aligns the struct so that the missing 4 bytes are not noticed.

With this change, the python bindings will expose all functions
that gpgme exposes, including the deprecated ones.

Credits go to Justus Winter for debugging and identying the issue.

Signed-off-by: Tobias Mueller <muelli@cryptobitch.de>
GnuPG-bug-id: 3892
2018-04-17 10:20:12 +02:00
..
cl .gitignore: flesh out rules and add subdirectory-.gitignores. 2012-04-20 16:05:11 +02:00
cpp cpp: Expose skipped_v3_keys 2018-03-15 16:23:18 +01:00
python python: Fix crash by leaving struct members intact 2018-04-17 10:20:12 +02:00
qt qt: Add test for resetting config value 2018-04-04 11:21:53 +02:00
Makefile.am build: Declare all languages for make dist. 2016-08-10 16:28:36 +02:00
README json: Add framework for the gpgme-json tool 2018-03-16 13:55:48 +01:00

Language Support for GPGME
--------------------------

This directory contains support for other languages than C.

Please note that language support components may be under a different
license than GPGME itself.  You can find more information in each
sub-directory.

Directory	Language

cl		Common Lisp
cpp		C++
qt		Qt-Framework API
python		Python 2 and 3 (module name: gpg)
javascript      Native messaging client for the gpgme-json server.