* doc/examples/gpgme-chrome.json, doc/examples/gpgme-mozilla.json: New.
* doc/Makefile.am (EXTRA_DIST): Include them.
--
The id contained in the examples is the ID of Mailvelope.
* configure.ac: Remove js language.
--
It does not make much sense to integrate gpgme-js into the
GPGME build system. gpgme-js will be distrbuted by it's users
as part of the web extensions / their distribution as that
is the JavaScript way.
So they can use their tools etc. to compile gpgme-js JavaScript
style, which is documented in the lang/js folder.
--
* src/Keyring.js: Changed key ecpiration from Date to seconds from
creation, as in gpgme. The Date parameter used before was due to a
misunderstanding in documentation and requests from potential users.
* src/gpgme-json.c (op_createkey, hlp_createkey): Add subkey_algo
handling.
(hlp_createkey): Fix documentation of expiry.
--
Due to the funny quick-gen-key interface generating a key
with an explicit algo would result in bad defaults (only an SC key),
without a subkey.
This adds handling that should probably be in GnuPG proper to fix
the semantics of createkey by adding default subkey_algo handling.
--
* undoes 94ee0988d4 and
e16a87e839.
I do not fully understand why my approach was bad, but I am not in
a position to argue. This revert was requested to me after a review,
and I'm doing it in the assumption that more experienced people know
better than me.
* unittests: Also changed some outdated tests that stopped working
since 754e799d35 (as GPGME_Key is not
exported, one cannot check for instanceof in the tests anymore)
* import-key.py: fixed a minor typo.
* pmkey-import.py: locates and imports keys from the ProtonMail keyserver.
* pmkey-import-alt.py: the same as the previous except with setting an
alternative $GNUPGHOME directory.
* Moved the build import back up where it belongs.
* Included comments indicating how to build and install for multiple
Python versions beyond the first 2 on the same system.
* lang/python/version.py.in: Fixed most things, but there's still an
issue near the build portion with the existing Python bugs referenced.
* lang/python/setup.py.in: Now PEP8 compliant.
* PEP8 compliance for all constants except the globals in
src/constants/__init__.py depending on whether the import sequence
affects the globals themselves.
--
* Arriving strings (i.e. user id names, error messages) are not
always in javascript encoding. This is an attempt to go through
the whole gpgme answer (with the exception of payload data) and
to fix the encoding of these
--
* src/Key.js The synchronous mode for a Key does not offer an armor/
armored property anymore. This frees up a lot of performance issues,
also the armored expoort is expected to change quite often, so a
cached version is not advisable.
* hasSecret/getHasSecret is now refactored, to reflect their uses.
With get('hasSecret') there is a method that fetches the result.
* src/Key.js also some refactoring
--
* src/Key.js Key class is not exported anymore, as it should not be
used directly anywhere. setKeyData is no more a method of the Key,
(optional) data are now validated and set on Key creation and on
updates, both from within this module, thus no longer exposing
setKeyData to the outside.
* createKey now gained an optional parameter which allows to set Key
data at this point.
--
* src/Keyring.js: An empty result should no longer cause an error,
the import feedback summary has been refactored slightly
* Browsertests to reflect import feedback change
--
* src/Keyring.js I wrongly assumed an object to be a GPGME_Key,
it was the raw answer from nativeMessaging instead. Now it returns
a GPGME_Key again.
--
* src/Keyring.js: The answer was not parsed correctly, so a config was
being ignored.
* If no config is set, we return the first non-invalid key with a
secret, instead of the first key (which may be e.g. an expired one)
--
* src/Keyring.js: In case no default Key is set in configuration,
only Keys reported as having a secret part should be considered
for default Keys, avoiding some extra requests.
--
* src/Key.js: the fingerprint returned by a Key is now always upper
case hex, even if the constructor had lower case input. This is to be
more consistent with gpgme and to be more readable and reliable in
comparisions.
* lang/python/examples/howto/symcrypt-file.py: *sigh*; passphrase was
right the first time, just the error check that wasn't.
* I really should stop second guessing myself one of these days ...
Signed-off-by: Ben McGinnes <ben@adversary.org>
* Ran all the .py files in src/ and below through Yapf.
* Included some manual edits of core.py, this time successfully making
two notorious sections a bit more pythonic than scheming.
* Left the module imports as is.
* This will be committed if it passes the most essential test:
compiling, installing and running it.
Signed-off-by: Ben McGinnes <ben@adversary.org>
* src/cJSON.c, src/gpgme-json.c (CALLOC_ONLY): New define
to change xmalloc / xtrymalloc to use calloc.
--
Some people consider malloc dangerous as it might allow an
information leak.
* src/gpgme-json.c (encode_and_chunk): Don't error out
if no chunksize is provided.
--
This fixes 82e4b900a9 which
caused every call without chunksize to error out.
* lang/cpp/src/gpggencardkeyinteractor.cpp
(GpgGenCardKeyInteractor::Private::keysize): Change to string.
--
The value is only required as string so we can save it this
way to avoid the need to convert it for the action command.
GnuPG-Bug-Id: T4094
* lang/python/tests/Makefile.am,
lang/qt/tests/Makefile.am,
tests/Makefile.am,
tests/gpg/Makefile.am,
tests/gpgsm/Makefile.am,
tests/opassuan/Makefile.am (GNUPGHOME): Make variable explict.
--
If the build directory has too long path, gpgme could fail.
This is similar to
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=847206
In order to fix that, this patch extracts the GNUPGHOME variable
to be presented directly in the Makefile and thus overridable by
command line option.
A build system can then create a symlink to the GNUPGHOME directory
in /tmp and use that symlink as the GNUPGHOME directory
thus making the path very short.
GnuPG-Bug-Id: T4091
Patch provided by vlmarek
--
* src/index.js: The export now uses a freezed Object, which does not
allow for simply overwriting the init method by e.g. a third-party
library.
* BrowsertestExtension: Added some tests trying if decryption of bad
data properly fails
--
* The aim is to iterate through the results of the first request
(all keys), and then add the propert 'hasSecret' to those that
are in the second request (secret Keysring) as well. I messed
this up in a recent change, and it escaped testing.
--
* An Object.freeze should stop any malicious third party from changing
objects' methods once the objects are instantiated (see unittest for
an approach that would have worked before)
- An initialized gpgmejs- object doesn't have a '_Keyring' property
anymore (it still has its 'Keyring')
- The internal expect='base64' needed to be turned into a method.
--
* src/ [Connection, Error, Key, Keyring, MEssage, Signature, gpgmejs]:
Functions and values that are not meant to be overwritten are now
moved into their constructors, thus eliminating the possibility of
overwrites after initialization.
* Key: The mode of use (synchronous cached, or async promises) ivs now
determined at initialization of that Key. The property Key.isAsync
reflects this state.
* unittests: fixed old Key syntax for testing.
* Message.js isComplete is now a method and not a getter anymore.
* Added some startup tests.
--
Tests will now run with one instance of gpgmejs each block,
which reduces overhead. Readability is (hopefully) improved),
some negative tests are added.
There is still a performance problem in base64 encoding/decoding,
which causes some tests to fail due to time out.