Commit Graph

11 Commits

Author SHA1 Message Date
Daniel Kahn Gillmor
2f12427e41 doc: use https:// for www.gnu.org
--

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2018-10-18 00:28:51 -04:00
Maximilian Krambach
3201ded91f js: add tests
--

* 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-30 15:00:19 +02:00
Maximilian Krambach
61ac70cfb5 js: return base64 after encrypt with armor=false
--

* 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-29 17:45:55 +02:00
Maximilian Krambach
f0409bbdaf js: make method parameters objects
--

* 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-22 18:37:46 +02:00
Maximilian Krambach
dd32daad0b js: add and apply eslint rules
--

* mainly spacing, see .eslintrc.json for details
2018-08-20 15:12:01 +02:00
Maximilian Krambach
1105fc87a3 js: add Key lookup
--

* src/Keyring.js: getKeys() now has the option "search", which will
  trigger a remote lookup (as configured in gpg) for the string given
  as pattern.
* src/permittedOperations: make use of the new 'locate' option in
  keylist
* DemoExtension: Add a button for lookup, to demonstrate the
  functionality
2018-07-04 12:11:35 +02:00
Maximilian Krambach
88e7f8ec2e js: Demoextension update
--

* src/Signature: typo
* src/gpgmejs.js: fixed wrong scope in verification
* right now verify does not succeed in the DemoExtension.
  This is probably a problem in conversion or line ending.
2018-06-20 13:46:41 +02:00
Maximilian Krambach
780f7880c6 js: getDefaultKey and GenerateKey improvements
--

* src/Keyring.js: added more options for key generation.

* src/Key.js: GetDefaultKey now relies on the info associated with the
  key, as the approach of relying on a secret subkey did not work as
  intended
* DemoExtension: Added a button for retrieval of the subkey, to test
  this functionality.
2018-06-19 09:26:01 +02:00
Maximilian Krambach
aed402c5d5 js: getDefaultKey and verify fix
--

* DemoExtension/maindemo.js - added a Demo for retrieving the default
  signing key

* src/Errors.js - add a new Error if no default key can be determined

* src/Key.js added documentation and a TODO marker for hasSecret.

* src/Keyring.js implemented getDefaultKey

* src/permittedOperations.js: Added missing entry for verify,
    added config_opt
2018-06-13 15:22:03 +02:00
Maximilian Krambach
bfd3799d39 js: code cleanup (eslint)
--
* trying to stick to eslint from now on for readability

* As some attribution was lost in previous git confusions, I added my
  name into some of the licence headers
2018-06-06 13:05:53 +02:00
Maximilian Krambach
1f7b19512c js: created TestExtension and smaller fixes
--

* Extensions:

  - Moved testapplication to Demoextension
  - Created BrowserTestExtension.
    Includes mocha and chai. For running tests that cannot be run
    outside a WebExtension

  Both Extensions can be found zipped in build/extensions after
  running build_extensions.sh

* Code changes:
  - src/Config: Place for the configuration
  - small fixes raised during testing in Keyring.js, Message.js,
  - src/gpgmejs_openpgpjs.js don't offer direct GpgME object to the
    outside, as it only causes confusion
  - index.js init() now checks the config for validity

* Tests:
  - Reordered tests in test/.
  - Input values are now in a separate file which may be of use for
    bulk testing

* moved the build directory from dist to build
2018-04-26 17:13:34 +02:00