aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/BrowserTestExtension/tests/encryptDecryptTest.js (follow)
Commit message (Collapse)AuthorAgeFilesLines
* doc: use https:// for www.gnu.orgDaniel Kahn Gillmor2018-10-181-1/+1
| | | | | | -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* js: add configuration option on startupMaximilian Krambach2018-09-191-1/+1
| | | | | | | | | | | | | | -- * 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.
* js: add decrypt result optionsMaximilian Krambach2018-08-221-0/+24
| | | | | | | | | | | -- * 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.
* js: make method parameters objectsMaximilian Krambach2018-08-221-77/+83
| | | | | | | | | | | | -- * 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
* js: add and apply eslint rulesMaximilian Krambach2018-08-201-3/+3
| | | | | | -- * mainly spacing, see .eslintrc.json for details
* js: clean up test extensionMaximilian Krambach2018-07-271-142/+113
| | | | | | | | | | | -- 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.
* js: change chunksize handling and decodingMaximilian Krambach2018-06-081-29/+2
| | | | | | | | | | -- * the nativeApp now sends all data in one base64-encoded string, which needs reassembly, but in a much easier way now. * there are some new performance problems now, especially with decrypting data
* js: code cleanup (eslint)Maximilian Krambach2018-06-061-41/+50
| | | | | | | | -- * 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
* js: implement import/delete Key, some fixesMaximilian Krambach2018-06-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | -- * Keyring.js - implemented importKey: importing one or more armored public key blocks. - implemented deleteKey: deleting a public Key from gpg. * Key.js renamed property Key.armor to Key.armored * Helpers.js: toKeyIDArray does not complain anymore if there are no keys. Not having Keys in e.g. signing keys in encrypt is legitimate and common, the complaints were getting spammy * Errors.js: gpgme_errors now always pass an optional additional message, for easier debugging in minified code * Connection.js: Fix in gpgme-json responses containing objects * eslintrc.json: Start using eslint. A cleanup to conform to it is not done yet * Added further tests for the new functionality
* js: Treat a connection as a gpgme ContextMaximilian Krambach2018-05-281-7/+0
| | | | | | | | | | | | | -- * After an operation a connection should be disconnected again. The "end of operation" is now assumed to be either an error as answer, or a message not including a "more" * GPGME, GPGME_Key, GPGME_Keyring don't require a connection anymore * Message.js: The Message.post() method will open a connection as required
* js: transfer encoding changesMaximilian Krambach2018-05-221-12/+121
| | | | | | | | | | | | -- * Uint8Arrays are not supported for now there are unsolved issues in conversion, and they are lower priority * encrypt gains a new option to indicate that input values are base64 encoded * as decrypted values are always base64 encoded, the option base64 will not try to decode the result into utf, but leave it as it is
* js: Tests and improvements for openpgp modeMaximilian Krambach2018-05-141-15/+6
| | | | | | | | | | | | | -- * Added openpgp - Mode tests to the browsertest Extension. These tests require openpgp, which should not be a hard dependency for the main project. Packing openpgpjs into the extension is still TODO * Fixes: - openpgp mode API now correctly handles parameters as an object, similar to openpgpjs - proper check and parsing of openpgpjs Message Objects
* js: more testing of nativeMessaging connectionMaximilian Krambach2018-05-091-152/+39
| | | | | | | | | | | | | -- * There were some inconsistencies between utf-8, transfer and browsers' utf16, which broke characters that were split between individual messages. src/Connection now contains a workaround that reassembles javascripts' format from passed base64 strings. This needs someone more experienced looking. * Added several new tests which were failing during initial debugging of this issue * reorganized BrowsertestExtension to avoid cluttering.
* js: more testingMaximilian Krambach2018-05-081-10/+176
| | | | | | | | | | | | -- * Tests: Under certain circumstances, some data change during encrypt-decrypt. Committing the current state so the problem can be discussed. * Fixes: - disconnecting the test ports after tests are complete - fixed passing of the error message from gpgme-json
* js: fixing errors found by testing: encrypt/decryptMaximilian Krambach2018-05-071-0/+72
-- * Key.js: Error code for wrong parameter in createKey should be "PARAM_WRONG" * Helpers.js: The property openpgpjs-like Objects were checked for in toKeyIdArray was not defined. * src/permittedOperations.js: updated more expectations and assumptions for the native API * new Problems: - There seems to be a message size limit of about 21 MB for nativeMessaging, much lower than the documented 4GB. - Some bytes are lost with random data in an encrypt-decrypt roundtrip. The culprit is unclear.