aboutsummaryrefslogtreecommitdiffstats
path: root/lang (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* python bindings: importing from keyservers with hkp4pyBen McGinnes2018-09-222-3/+181
| | | | | | | | | | * added a new example script to search the keyservers and import the results, this time using Marcel Fest's hkp4py module. * Updated the key importing section to match this addition. * Tested with the current version of hkp4py from github. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* docs: python bindings howtoBen McGinnes2018-09-221-1/+19
| | | | | | | | | | | | * Confirmed that updates to the tests have significant'y improved that output. * Updated some of the additional notes for the section on hkp4py. ** This is in anticipation adding at least import examples using that module as well. It may also include adding examples of exporting a key and uploading it to the keyservers. Tested-by: Ben McGinnes <[email protected]> Signed-off-by: Ben McGinnes <[email protected]>
* python: Fix a couple of syntax errors.Werner Koch2018-09-204-84/+92
| | | | | | | | | | * lang/python/tests/t-keylist-from-data.py: Add missing line continuation. * lang/python/tests/t-keylist.py: Ditto. * lang/python/tests/t-quick-key-creation.py: Ditto. * lang/python/tests/t-quick-subkey-creation.py: Ditto. Signed-off-by: Werner Koch <[email protected]>
* python: Silence a few warnings.Werner Koch2018-09-201-1/+8
| | | | | | | | * src/gpgme.h.in: Obsolete "class" also for Python. * lang/python/gpgme.i: Silenece a swig warning. Silence a gcc warning. Signed-off-by: Werner Koch <[email protected]>
* js: renamed keygen algo optionMaximilian Krambach2018-09-201-2/+2
| | | | | | | | -- * src/Keyring.js: Confused default-future with future-default * reverts commit 34be6163f6c1057e2a87705925a9d0c70e4ecf17
* python: Fix regression in the test suite.Werner Koch2018-09-201-1/+1
| | | | | | | | * lang/python/tests/Makefile.am (GNUPGHOME): Remove stray backslash. -- Fixes-commit: d09d19fa9fe1e81dd819b32208b4bd09f83e3918 Signed-off-by: Werner Koch <[email protected]>
* tests: Don't try using keys from a scmartcard.Werner Koch2018-09-201-0/+4
| | | | | | | * tests/gpg/Makefile.am: Disable scdaemon * lang/python/tests/Makefile.am: Ditto. Signed-off-by: Werner Koch <[email protected]>
* docs: python bindings and its special requestBen McGinnes2018-09-201-3/+31
| | | | | | | | * Added some material on using the new-ish hkp4py module with GPGME. * Example code will be added later once a couple of little issues are addressed. Signed-off-by: Ben McGinnes <[email protected]>
* js: add 'default-future' as createKey optionMaximilian Krambach2018-09-191-1/+1
| | | | | | -- * src/Keyring.js: default-future can be used now for key creation as algo.
* json: Remove subkey-algo from createkey command.Werner Koch2018-09-192-12/+1
| | | | | | | | | | | | | | | | | * src/gpgme-json.c (op_createkey): Remove subkey-algo param. (GPG_AGENT_ALLOWS_KEYGEN_TRHOUGH_BROWSER): Fix typo. * lang/js/src/Keyring.js: Remove subkey-algo support. * lang/js/src/permittedOperations.js: Ditto. -- We do not want to expose details of the protocol's key generation and thus the subkey-algo does not make sense. Right now we support only the default and future-default algorithms. A user can configure them anyway using new-default-key-algo in gpg.conf. Eventually we may officially support a more flexible way of creating special structured OpenPGP keys but right now that is not part of the API. Signed-off-by: Werner Koch <[email protected]>
* js: add configuration option on startupMaximilian Krambach2018-09-1912-29/+41
| | | | | | | | | | | | | | -- * src/index.js: Added an optional configuration object for the startup. * configuration: timeout - the initial check for a connection ran into timeouts on slower testing machines. 500ms for initial startup is not sufficient everywhere. The default timeout was raised to 1000ms, and as an option this timeout can be increased even further. * BrowsertestExtension: Set the initial connection timeouts to 2 seconds, to be able to test on slower machines.
* docs: python bindingsBen McGinnes2018-09-173-7/+21
| | | | | * Updated the Cython example code slightly, along with the corresponding explanation.
* docs: python bindings howtoBen McGinnes2018-09-171-20/+11
| | | | * Tightened up the Cython demonstration.
* docs: cython sanitizedBen McGinnes2018-09-162-2999/+5
| | | | | | | * 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-164-0/+3135
| | | | | | | | | | | | * 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-161-1/+1
| | | | | * 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-161-1/+3
| | | | | | * 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 updateBen McGinnes2018-09-151-1/+7
| | | | | | | | * 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.
* 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.
* 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
| | | | --
* 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-301-7/+7
| | | | | | | | | | | | * 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.
* 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.
* 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
* 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