aboutsummaryrefslogtreecommitdiffstats
path: root/lang (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-09-17docs: python bindings howtoBen McGinnes1-20/+11
* Tightened up the Cython demonstration.
2018-09-16docs: cython sanitizedBen McGinnes2-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.
2018-09-16docs: python bindings howtoBen McGinnes4-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.
2018-09-16docs: even more editsBen McGinnes1-1/+1
* doc/gpgme-python-howto.texi: hunting down and killing commas, Oxford or not it can't stay in a heading.
2018-09-16docs: more editsBen McGinnes1-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.
2018-09-15docs: whitespace culledBen McGinnes1-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.
2018-09-15docs: renaming and draftsBen McGinnes1-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.
2018-09-15docs: Python howto updateBen McGinnes1-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.
2018-09-15Python bindings: docsBen McGinnes1-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.
2018-09-15Python bindings: examplesBen McGinnes2-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.
2018-09-15Python examples: backwards compatibilityBen McGinnes2-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).
2018-09-10js: Fix errorDetails of GPGME_SignatureThomas Oberndörfer1-2/+2
* lang/js/src/Signature.js (GPGME_Signature.errorDetails): Access properties from the summary object.
2018-09-06js: add new documentation file to extra_distMaximilian Krambach1-0/+1
-- * jsdoc_index.md is the documentation's 'main page' to offer a better intro than only the parser-generated API confusion.
2018-09-06js: fix error in toKeyIdArrayMaximilian Krambach2-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.
2018-09-05js: documentation cleanupMaximilian Krambach11-101/+215
--
2018-08-31js: key deletion after testMaximilian Krambach1-2/+2
-- * Yet again some wrong syntax in Browsertests
2018-08-31js: cleanup after key import testMaximilian Krambach1-1/+3
-- * one of the public Keys imported was not removed afterwards.
2018-08-31docs: python bindingsBen McGinnes1-2/+2
* minor typographic update. Signed-off-by: Ben McGinnes <[email protected]>
2018-08-30js: tests for file name encodingMaximilian Krambach2-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.
2018-08-30js: decoding of informationMaximilian Krambach1-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.
2018-08-30js: add testsMaximilian Krambach4-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)
2018-08-30js: add encoding parameter for encrypt returnMaximilian Krambach1-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
2018-08-30js: separate gpgme answer by type of dataMaximilian Krambach2-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'
2018-08-30python bindings: estreams fixben/estreams-fixBen McGinnes1-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]>
2018-08-29js: return base64 after encrypt with armor=falseMaximilian Krambach2-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.
2018-08-29python bindings: coreBen McGinnes1-6/+7
* lang/python/src/core.py: expanded gpgme_error check lists.
2018-08-29python bindings: coreBen McGinnes1-0/+1
* lang/python/src/core.py: added gpgme_data_set_flag to the errorcheck funtion.
2018-08-29python bindings: coreBen McGinnes1-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.
2018-08-29docs: python bindings - protonmail examplesBen McGinnes3-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.
2018-08-28docs: python bindings HOWTOBen McGinnes1-13/+24
* Finished CFFI vs SWIG bit in known issues. * tidied up some of the structure. * Fixed some minor errors and links.
2018-08-28docs: python bindingsBen McGinnes1-3/+22
* Added section on why no CFFI.
2018-08-28docs: python howtoBen McGinnes1-0/+94
* Added another key import example using ProtonMail's new keyserver.
2018-08-27docs: python bindingsBen McGinnes1-1/+157
* Added details on installation troubleshooting.
2018-08-27js: small documentation updateMaximilian Krambach1-1/+2
--
2018-08-27js: make non-payload data more encoding-tolerantMaximilian Krambach1-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.
2018-08-27js: typecheck destructured parametersMaximilian Krambach3-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
2018-08-27js: extend information on decoding in decryptMaximilian Krambach2-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.
2018-08-27js: fix file_name return on decryptMaximilian Krambach1-17/+17
-- * src/gpgmejs: Line 228 checked the wrong variable. To avoid further confusion, _result was renamed to returnValue in the whole file
2018-08-24js: add new options to permittedOperationsMaximilian Krambach1-0/+6
-- * reflecting the new optional strings accepted by the backend. 'file_name' and 'sender' can be used via the 'additional' parameter in encrypt operations
2018-08-23js: fix syntax inside Keyring methodsMaximilian Krambach1-1/+2
-- * recent changes in parameter calling led to a forgotten internal call in getDefaultKey using old syntax (and failing in case a default key is configured)
2018-08-23js: offer an always-trust parameter on encryptMaximilian Krambach1-1/+7
-- * src/gpgmejs.js: Setting the default to 'always trust' assumes that most api users will already have made their internal checks, but may not have the gnupg web-of-trust model implemented, thus trusting the key themselves, without gnupg having full or even any information. Still it should stay an option to have gnupg decide.
2018-08-23js: use destructured option parametersMaximilian Krambach3-107/+66
-- * Adds to f0409bbdafcbd4f8b0be099a6b3ce0d5352c9bcd and makes use of destructuring, allowing for defaults, and cleaning up the validation.
2018-08-23js: update getDefaultKey to more precise logicMaximilian Krambach1-1/+6
-- * src/Keyring.js: Adapted Keyring.getDefaultKey() to my current understanding of a default signing key: either the default key set in the gpg config, or 'the first usable private key' - usability meaning 'not invalid, expired, revoked, and can be used for signing'. It should be the same key used as in command line when doing a --sign operation. In case the user has a smartcard plugged in, we currently won't know of this here, so our choice may differ. But as we do all javascript-binding sign operations with the key fingerprint explicitly set, this should not be a real problem. This method is seen more as a convenience to tell using librarys which key represents the main user.
2018-08-22js: add decrypt result optionsMaximilian Krambach4-12/+44
-- * As a decrypt result cannot be known beforehand, the decrypt operation may add an 'expect' property, taking either 'uint8' or 'base64', which will return the decrypted data in the appropiate formats. the return property 'format' will give a feedback on which option was taken. A test was added to reflect these changes.
2018-08-22js: make method parameters objectsMaximilian Krambach11-309/+385
-- * As requested by using parties, the options to be passed into the methods are now objects, with the objects' properties better describing what they do, and to avoid the need to type several nulls in a method call if one wants the last parameter. - src/Keyring.js, src/gpgme.js: Changed parameters and their validations - BrowserTest/*.js Had to adapt quite some calls to the new format
2018-08-22js: improve decryption performanceMaximilian Krambach5-19/+100
-- * src/Connection.js, src/Helpers.js: performance of decoding incoming base64 data was improved to about 4 times the speed by introducing two more efficient functions (thanks to [email protected] for finding and testing them) * src/gpgmejs.js: Decrypted data will now return as Uint8Array, if the caller does not wish for a decoding. Decoding binary data will return invalid data, and a Uint8Array may be desired. This can be indicated by using the (new) 'binary' option in decrypt. * src/Errors.js A new error in case this decoding fails * src/Message.js, src/Connection.js: expected is change from base64 to binary, to avoid confusion later on.
2018-08-22js: Return error if signature has no fingerprintMaximilian Krambach1-1/+4
-- * src/Signature.js/get fingerprint: A signature with no fingerprint should not happen, but if it does, we should throw an error here, as the method is a getter.
2018-08-22js: changed verify signature result infosjavascript-bindingMaximilian Krambach2-21/+28
-- * the resulting information of verify now are as documented, and the same as in a decrypt callback
2018-08-22js: throw errors in sync functionsMaximilian Krambach6-61/+76
-- * synchronous functions should throw errors if something goes wrong, Promises should reject. This commit changes some error cases that returned Error objects instead of throwing them - src/Key.js: createKey() and sync Key.get() throw errors - src/Error.js: Exporting the list of errors to be able to test and compare against these strings - src/Keyring.js: Setting a null value in pattern is not useful, and now caused an error with the new changes. - src/Message.js: createMessage and Message.setParameter now throw errors
2018-08-21js: update decrypt/verify resultsMaximilian Krambach4-12/+49
-- * src/gpgmejs.js: Decrypt now parses additional optional dec_info information, as well as any verify information, if present * src/permittedOperations: Now decrypt also expect the new return object dec_inf (containing info such as is_mime and file_name)