aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* docs: python bindings howtoBen McGinnes2018-09-172-40/+22
| | | | * Tightened up the Cython demonstration.
* docs: cython sanitizedBen McGinnes2018-09-163-3001/+10
| | | | | | | * Sanitized the shell command examples of extraneous whitespace. * Removed keycount.c as sanitising it is pointless and it will be generated by Cython when the example is followed. * Regenerated the .texi version.
* docs: python bindings howtoBen McGinnes2018-09-165-0/+3254
| | | | | | | | | | | | * Added new advanced section with an example of using the Python bindings with CPython code compiled back to C code using Cython. * Though it may seem a bit counter-intuitive to use the bindings just to go back to C via a different route, this is not actually stupid. * Added examples/howto/advanced/cython/ directory. * Added keycount.pyx, setup.py and the keycount.c file which the first two generated with Cython. Not including the .so and .o files from the build. * Exported the .texi version of the howto for the main docs.
* docs: even more editsBen McGinnes2018-09-162-5/+5
| | | | | * doc/gpgme-python-howto.texi: hunting down and killing commas, Oxford or not it can't stay in a heading.
* docs: more editsBen McGinnes2018-09-162-17/+76
| | | | | | * lang/python/docs/gpgme-python-howto.org: more tweaks and edits, along with another build of output formats. * doc/gpgme-python-howto.texi: updated texinfo version for parent docs.
* docs: whitespace culledBen McGinnes2018-09-151-4/+16
| | | | | | * lang/python/docs/gpgme-python-howto.org: Identified and fixed the headings which kept generating lines with trailing whitespace when exporting to Texinfo format and adjusted them to prevent that.
* docs: renaming and draftsBen McGinnes2018-09-151-0/+34
| | | | | | | | * lang/python/docs/gpgme-python-howto.org: Renamed file to better fit the rest of the project's docs. * Added a section on the very unofficial drafts I periodically post links to since they're often the easiest way to get a web version in front of someone in a hurry.
* docs: python howto texinfo updateBen McGinnes2018-09-151-4/+4
| | | | * doc/gpgme-python-howto.texi:
* docs: Python howto updateBen McGinnes2018-09-152-12/+22
| | | | | | | | * lang/python/docs/GPGMEpythonHOWTOen.org: Added corresponding GPGME version number to table at the start and cut the shortcut from the groups.py example. * doc/gpgme-python-howto.texi: New export of Texinfo file for docs build.
* docs: generated whitespaceBen McGinnes2018-09-151-4/+4
| | | | | * doc/gpgme-python-howto.texi: culled whitespace included with the org-mode export.
* Docs: including howto with standard docsBen McGinnes2018-09-152-1/+4
| | | | | | | * gpgme.spec.in: Added gpgme-python-howto.info build on the grounds that it now deals with certain possible installation issues and end users encountering them would want the docs to hand. * doc/gpgme.texi: updated the copyright year to this year.
* Docs: Python bindings HOWTOBen McGinnes2018-09-152-2/+2150
| | | | | | | | | * Added doc/gpgme-python-howto.texi: generated from GPGMEpythonHOWTOen.org and then slightly modified so the generated Info file doesn't use camelCase. * doc/Makefile.am: Updated makefile to include the Python HOWTO with gpgme_TEXINFOS and to export the generated files to the webserver along with the main GPGME one.
* Python bindings: docsBen McGinnes2018-09-151-16/+38
| | | | | | | * lang/python/docs/GPGMEpythonHOWTOen.org: Fixed a few errors in the newer sections. * Updated code in the examples using secret key exporting and group lines to reflect the Python 2.7 compatibility fixes added.
* Python bindings: examplesBen McGinnes2018-09-152-2/+8
| | | | | | * lang/python/examples/howto/export-secret-keys.py and groups.py: Updated the backwards compatibility adjustments to account for unicode differences between python 2 and 3.
* Python examples: backwards compatibilityBen McGinnes2018-09-152-2/+13
| | | | | | | | | | | * lang/python/examples/howto/groups.py: subprocess update * lang/python/examples/howto/export-secret-keys.py: subprocess update Both of these try the nice and easy method of getting the subprocess output available in Python 3, but will fall back to the older Popen method if it doesn't work. Essentially this is to be a little nicer to Python 2.7.15 (even though the examples are filled with warnings that py2 support is not guaranteed with the examples).
* js: Fix errorDetails of GPGME_SignatureThomas Oberndörfer2018-09-101-2/+2
| | | | | * lang/js/src/Signature.js (GPGME_Signature.errorDetails): Access properties from the summary object.
* estreams revisedBen McGinnes2018-09-082-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * Egon Spengler was right, crossing the streams is bad. * Restored both src/gpgme.def and src/libgpgme.vers to use the estreams symbols without the leading underscore. * The new_from_estream() function added to lang/python/src/core.py and set to alias the new_from_stream() function remains. * Opted for the solution favouring Linux onthree main grounds: 1. Andre reported major problems with Windows as well, so the number of potentially affected systems would vastly increase. 2. All the BSDs and OS X have spent far more time and development work in order to accommodate the eccentricities of both Microsoft and the GNU Project (ref. GCC), so they're more likely to be able to cope with doing so again than the other way around. 3. If I really have to I can write a custom installer for OS X to try this and, if it fails, to then patch the two symbol entries and recompile from scratch. That said, I may not have to since it actually behaved during the most recent tests for this commit; into ten separate CPython installations and all five supported versions (standard source installs and OS X Framework installs for each version). Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* js: add new documentation file to extra_distMaximilian Krambach2018-09-061-0/+1
| | | | | | -- * jsdoc_index.md is the documentation's 'main page' to offer a better intro than only the parser-generated API confusion.
* js: fix error in toKeyIdArrayMaximilian Krambach2018-09-062-3/+3
| | | | | | | | -- * src/Helpers.js: GPGME_Keys were not parsed as valid, as their fingerprint getter is not a fingerprint 'property'. * BrowserTestExtension: fixed a dsplay typo in counting of tests.
* js: documentation cleanupMaximilian Krambach2018-09-0511-101/+215
| | | | --
* estreams symbols for python bindingsBen McGinnes2018-09-022-1/+3
| | | | | | | | | | * It turns out that even though some platforms detect differing symbols for estreams, the two types do not appear to be in conflict. At least they don't from the BSD/OS X side of things. As a consequence both versions are now included. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* js: key deletion after testMaximilian Krambach2018-08-311-2/+2
| | | | | | -- * Yet again some wrong syntax in Browsertests
* js: cleanup after key import testMaximilian Krambach2018-08-311-1/+3
| | | | | | -- * one of the public Keys imported was not removed afterwards.
* docs: python bindingsBen McGinnes2018-08-311-2/+2
| | | | | | * minor typographic update. Signed-off-by: Ben McGinnes <[email protected]>
* js: tests for file name encodingMaximilian Krambach2018-08-302-2/+60
| | | | | | | | | -- * BrowsertestExtension/tests/decryptTest.js: There were cases in which file names returned in a wrong encoding from decryption. The test cases here are a 'Hello World' in a text file with different names, then being encrypted with cli gnupg.
* js: decoding of informationMaximilian Krambach2018-08-301-1/+1
| | | | | | | | | | -- * src/Helpers.js: This additional escape should 'repair' special characters like spaces in filenames. In the strange world of encoding there is little hope that this captures all cases, or that it will never fail to return some value, let alone meaningful. In my test cases it worked.
* js: add testsMaximilian Krambach2018-08-304-5/+138
| | | | | | | | | | | | | -- * BrowserTestExtension/tests: - decryptTest.js: Check Decryption and return values of binary data - encryptTest.js: Return data type of armored/non-armored encryption - added a small encoded input png for testing * DemoExtension/maindemo.js: Fixed unexpected usage of the Demo encrypt (non-armored)
* js: add encoding parameter for encrypt returnMaximilian Krambach2018-08-301-2/+9
| | | | | | | | | -- * src/gpgme.js: In case the encryption was done unarmored, the result is binary data. Added an option to either return the binary data as base64-encoded string or as Uint8Array, similar to return values of decrypt
* js: separate gpgme answer by type of dataMaximilian Krambach2018-08-302-47/+75
| | | | | | | | | | | -- * src/Connection.js; src/permittedOperations.js: To avoid further encoding problems, data sent by gpgme is now sorted as either 'payload' or 'info'. Payload data may come in any encoding, and here the 'expected' and 'format' options are used, 'info' data may contain text created by gnupg which may need re-encoding, but this should not be affected by 'expected' and 'format'
* python bindings: estreams fixben/estreams-fixBen McGinnes2018-08-303-9/+9
| | | | | | | | | | | | * lang/python/src/core.py: Adjusted new_from_estream function to alias new_from_stream instead of fd. * fixed the _gpgme import errors introduced in commit 08cd34afb762975b0273575035dacf69449ef241 by changing the exported functions/types to match the inner module where all the work is done, rather than the outer one(s). Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* js: return base64 after encrypt with armor=falseMaximilian Krambach2018-08-292-3/+7
| | | | | | | | | -- * src/gpgmejs.js/encrypt: the encrypted data were converted back to a (incorrect) string, whereas they should be data with no encoding specified. Returning base64 data is the expected way. * DemoExtension: caught yet another usage of old syntax.
* python bindings: coreBen McGinnes2018-08-291-6/+7
| | | | * lang/python/src/core.py: expanded gpgme_error check lists.
* python bindings: coreBen McGinnes2018-08-291-0/+1
| | | | | * lang/python/src/core.py: added gpgme_data_set_flag to the errorcheck funtion.
* python bindings: coreBen McGinnes2018-08-291-1/+7
| | | | | * lang/python/src/core.py: added new function new_from_estream to wrap new_from_fd just like new_from_stream does and for the same reason.
* json: Fix detached verifyAndre Heinecke2018-08-291-20/+23
| | | | | | | | | * src/gpgme-json.c (op_verify): Only create output and use it for clearsigned and opaque signed. -- Just passing output to gpgme_op_verify changes the behavior to no longer do a verify of the signature.
* docs: python bindings - protonmail examplesBen McGinnes2018-08-293-1/+17
| | | | | | | | * lang/python/docs/GPGMEpythonHOWTOen.org: Updated links to the ProtonMail keyserver import scripts and added a warning regarding being unable to update third party keys. * lang/python/examples/howto/pmkey-import-alt.py: added usage. * lang/python/examples/howto/pmkey-import.py: added usage.
* Merge branch 'master' of ssh+git://playfair.gnupg.org/git/gpgmeBen McGinnes2018-08-281-4/+23
|\
| * json: Delete primary key if subkey gen failsAndre Heinecke2018-08-281-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | * src/gpgme-json.c (op_delete): Delete primary key on subkey gen error. -- This can happen for example if the user cancels the pinentry to unlock the primary key when adding the subkey. To avoid an artifact of a pimary key without an encryption capable subkey we delete the created key and treat the whole operation as failed.
| * json: Allow NULL request in encode and chunkAndre Heinecke2018-08-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | * src/gpgme-json.c (encode_and_chunk): Don't error on NULL request. -- This fixes the error that is passed when parthing the json object failed and request would be NULL. Instead of the JSON parser error it would otherwise report that encode and chunk failed.
* | docs: python bindings HOWTOBen McGinnes2018-08-281-13/+24
| | | | | | | | | | | | * Finished CFFI vs SWIG bit in known issues. * tidied up some of the structure. * Fixed some minor errors and links.
* | docs: python bindingsBen McGinnes2018-08-281-3/+22
| | | | | | | | * Added section on why no CFFI.
* | docs: python howtoBen McGinnes2018-08-281-0/+94
| | | | | | | | * Added another key import example using ProtonMail's new keyserver.
* | docs: python bindingsBen McGinnes2018-08-271-1/+157
|/ | | | * Added details on installation troubleshooting.
* js: small documentation updateMaximilian Krambach2018-08-271-1/+2
| | | | --
* js: make non-payload data more encoding-tolerantMaximilian Krambach2018-08-271-1/+8
| | | | | | | | | | | | -- * src/Helpers.js: As non-payload data might come in different encodings, a conversion has been introduced that worked in most cases. Data like the userid might come in different encodings, which we don't know of. For now, a try..catch returns the data as they are if the utf-8 decoding fails. Sometimes this yields the correct result, sometimes it may not work, but it won't stop the whole operation anymore.
* js: typecheck destructured parametersMaximilian Krambach2018-08-273-20/+40
| | | | | | | | | | | | | | -- * destructuring just takes the input argument and treats it as object. In cases like in src/Keyring/generateKey, where I forgot to change the old syntax, the fingerprint as string was destructured into an object without "pattern", which caused all Keys to be retrieved. So, methods with a destructuring now check if the first argument is an object and get a default empty object if no parameter is submitted. This allows the further use of destructured parameters, while still ensuring nothing vastly incorrect is used. * src/Kering.js, unittsets.js: fixed old syntax in method usage
* json: Do not put FILE_NAME into the verify result.Werner Koch2018-08-271-2/+1
| | | | | | | | | | | | | | | | | | | | * src/gpgme-json.c (verify_result_to_json): Remove "file_name". -- Having the file name in the verify result may lead developers to assume that the file name is covered by the signature. This is not the case and can easily be checked by hex-editing a signed message. We better don't output it at all. The same is true for the is_mime flag but that is anyway only an advisory and I can't see damage from a faulty one. Note that we keep file_name in gpgme's output for ABI stability and because some tools want to display meta information even if they are subject to tampering. This is similar to the non-encrypted subject in mails. Signed-off-by: Werner Koch <[email protected]>
* doc: Add warning that FILE_NAME is not part of the signed data.Werner Koch2018-08-272-3/+12
| | | | --
* js: extend information on decoding in decryptMaximilian Krambach2018-08-272-3/+9
| | | | | | | | | | | | -- * src/Connection.js: resulting data, if not pure ascii, is base64 encoded in the result message. A further decoding attempt into javascript 'string' will be attempted by default, unless specified at the decrypt() method. The return value 'format' now shows which of the possibilities has been applied. The old boolean 'base64' now turns into format:'base64' if the returned payload is a base64 string after decryption.
* js: fix file_name return on decryptMaximilian Krambach2018-08-271-17/+17
| | | | | | -- * src/gpgmejs: Line 228 checked the wrong variable. To avoid further confusion, _result was renamed to returnValue in the whole file