| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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]>
|
|
|
|
|
|
|
|
|
| |
--
* 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.
|
|
|
|
| |
* lang/python/src/core.py: expanded gpgme_error check lists.
|
|
|
|
|
| |
* lang/python/src/core.py: added gpgme_data_set_flag to the errorcheck
funtion.
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| |
| | |
* Finished CFFI vs SWIG bit in known issues.
* tidied up some of the structure.
* Fixed some minor errors and links.
|
| |
| |
| |
| | |
* Added section on why no CFFI.
|
| |
| |
| |
| | |
* Added another key import example using ProtonMail's new keyserver.
|
|/
|
|
| |
* Added details on installation troubleshooting.
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
|
|
|
|
| |
--
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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]>
|
|
|
|
| |
--
|
|
|
|
|
|
|
|
|
|
|
|
| |
--
* 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.
|
|
|
|
|
|
| |
--
* src/gpgmejs: Line 228 checked the wrong variable. To avoid further
confusion, _result was renamed to returnValue in the whole file
|
|
|
|
| |
Signed-off-by: Werner Koch <[email protected]>
|
|
|
|
|
|
|
|
| |
--
* reflecting the new optional strings accepted by the backend.
'file_name' and 'sender' can be used via the 'additional'
parameter in encrypt operations
|
|
|
|
|
| |
* src/gpgme-json.c (hlp_encrypt, op_encrypt): Support sender
and file_name.
|
|
|
|
|
|
|
|
| |
--
* 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)
|
|
|
|
|
|
|
|
|
|
| |
--
* 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.
|
|
|
|
|
|
|
| |
--
* Adds to f0409bbdafcbd4f8b0be099a6b3ce0d5352c9bcd and makes use of
destructuring, allowing for defaults, and cleaning up the
validation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
--
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
--
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--
* 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.
|
|
|
|
|
|
|
|
| |
--
* 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.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a new language binding "gpgme.js" to GPGME. It
serves as a bridge between the native-messaging service "gpgme-json"
and JavaScript Applications.
The first user of this binding will be Mailvelope which will
see GnuPG integration in the near future.
GnuPG-Bug-Id: T4107
|
| |
| |
| |
| |
| |
| |
| | |
--
* the resulting information of verify now are as documented,
and the same as in a decrypt callback
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
--
* 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
--
* 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)
|
| |
| |
| |
| |
| |
| | |
--
* They are heavily outdated and offer no more useful information
|
| |
| |
| |
| | |
--
|
| |
| |
| |
| |
| | |
* lang/js/BrowserTestExtension/Makefile.am,
lang/js/Makefile.am (EXTRA_DIST): Update.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| | |
* lang/js/README: Clarify structure at the beginning.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| |
| |
| | |
--
* The option was recently added to gpgme-json; this reflects this on
javascript side
|
| |
| |
| |
| |
| |
| |
| | |
--
* on the javascript side a Date is expected, gpggme-json expects
seconds from 'now'
|
| |
| |
| |
| |
| |
| | |
--
* mainly spacing, see .eslintrc.json for details
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
--
* undoes 94ee0988d4eaac27785de6efb7c19ca9976e1e9c and
e16a87e83910ebb6bfdc4148369165f121f0997e.
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 754e799d35fd62d7a979452f44342934659908c7 (as GPGME_Key is not
exported, one cannot check for instanceof in the tests anymore)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
--
* 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
|
| |
| |
| |
| |
| |
| |
| | |
--
* the permittedOperation from last commit ended up in the wrong place.
sign does not return an additional 'info' object.
|
| |
| |
| |
| |
| |
| |
| | |
--
* src/permittedOperations.js: if decrypt includes a verification,
this info needs to pass, too.
|