Commit Graph

178 Commits

Author SHA1 Message Date
Edward Lee
7c019e0309 Bug 557591 - Add tests for Utils.stackTrace. 2010-05-17 14:17:32 -07:00
Edward Lee
7befe92e24 Bug 557591 - Add tests for Utils.lazySvc. [r=mconnor]
Add a fake service that definitely won't exist for testing purposes.
2010-05-17 13:46:19 -07:00
Edward Lee
d54124209a Bug 557591 - Add tests for Utils.lazy2/cb.
--HG--
rename : services/sync/tests/unit/test_utils_lazy.js => services/sync/tests/unit/test_utils_lazy2.js
2010-05-17 12:47:29 -07:00
Edward Lee
247c43e425 Bug 557591 - Add tests for Utils.lazy/cb.
--HG--
extra : rebase_source : 4f2d102f31b2afa8d3c34261b63b344fccef824b
2010-05-17 12:43:20 -07:00
Edward Lee
cdf7defc20 Bug 557591 - Add tests for Utils.deferGetSet. 2010-05-14 17:31:24 -07:00
Edward Lee
36f17f2c20 Bug 557591 - Add tests for Utils.anno. 2010-05-10 18:08:52 -07:00
Edward Lee
310f605d46 Bug 557591 - Add tests for Utils.makeGUID. 2010-05-10 17:22:48 -07:00
Edward Lee
0e5816ef90 Bug 557591 - Add tests for Utils.notify. 2010-05-10 17:05:50 -07:00
Edward Lee
c61020e275 Bug 557591 - Add tests for Utils.lock. 2010-05-10 16:42:04 -07:00
Edward Lee
ff586e08e3 Bug 557591 - Add tests for Utils.catch.
--HG--
extra : rebase_source : 545492072668cfb6862dde756506e12cf43d4375
2010-05-10 16:22:32 -07:00
Justin Dolske
661389fa2f Bug 513798 - Rewrite WeaveCrypto in JS. r=mconnor, r=dwitte
--HG--
rename : services/crypto/components/IWeaveCrypto.xpt => services/crypto/IWeaveCrypto.xpt
2010-04-21 19:02:16 -07:00
Edward Lee
3b4aa0220d Bug 550627 - Default reconciliation to server wins for older changed items [r=mconnor]
Save the time the tracker adds a new changed id and use that to compare the age of the record on the server vs the age of the local change to decide if it's server wins or client wins. Fix up various direct uses of changedIDs to use the API and make the save-to-disk lazy to avoid excessive writes. Add a test to make sure addChangedID only increases in time.
2010-04-01 15:54:53 -07:00
Edward Lee
ba60f514a6 Bug 552134 - Ensure that keyring/symmetric key haven't been tampered with [r=mconnor]
Store a HMAC with the encrypted symmetric key instead of just the wrapped key and verify that the HMAC matches before unwrapping. Test that normal getting works and a tampered payload/HMAC fails but succeeds on restoring the correct HMAC.
2010-03-25 19:23:44 -07:00
Edward Lee
e5bce4658d Bug 549638 - Ensure that encrypted payloads haven't been tampered with [r=mconnor r=dolske]
Generate a SHA256 HAMC hex string from the base64 ciphertext and base64 symmetric key. Generate a HMAC key from the symmetric key and cache them together when unwrapping. Refactor the Utils.sha1 to share the same digest code.

--HG--
extra : rebase_source : dae973c62317eb3b738306fc30ea19870555c7df
2010-03-16 16:31:56 -07:00
Edward Lee
21f7747109 Bug 548066 - JavaScript strict warning: clientData.js, line 194: reference to undefined property this.clients[id] [r=mconnor]
Get rid of get/setInfo on ClientEngine and ClientStore and expose functions to read/modify client data: stats, clearCommands, sendCommand. Also expose the local client information as local[ID,Name,Type,Commands] and rework the storage to use these instead of trying to keep the JS object clients entry in sync with prefs, etc. Update users of the old interface (service/tabs/chrome) to use the new local*. Set the client type based on app id instead of from each app's overlay.
2010-03-16 16:39:08 -07:00
Edward Lee
e73dbf06b9 Bug 547007 - Use a per-record IV instead of one for each symkey [r=mconnor]
Generate a random IV on every encrypt instead of taking it from the CryptoMeta. Don't bother generating a bulkIV per CryptoMeta.
2010-03-16 16:31:56 -07:00
Edward Lee
177b122960 Bug 547048 - Only allow clients to issue delete records [r=mconnor]
Don't specially serialize/not encrypt delete records and store the deleted flag as part of the cleartext payload.
2010-03-16 16:31:56 -07:00
Edward Lee
6c37148ae4 Bug 547049 - Verify that encrypted payloads correspond to the requested record [r=mconnor]
Write the record's id to both .data and .cleartext and check that they match when decrypting.
2010-03-16 16:31:56 -07:00
Edward Lee
4bdfeb9b77 Remove engines from failing load tests now that engines are gone. 2009-12-11 11:32:23 -08:00
Edward Lee
0be8c60c74 Update predecessor test to additionally test unsorted bookmark predecessors. 2009-10-13 21:07:32 -07:00
Edward Lee
b0c3b9005e Bug 515676 - Allow giving objects to PUT/POST without Filters to avoid stringify([parse(stringify(stringify(obj)))])
Get rid of Filters and automatically JSON.stringify PUT/POST data that aren't strings, so plain Records can be passed in to PUT and POST. This leverages toJSON of Records to provide an object that can be serialized. Fix up client record serialize/deserialize to still escape/unescape non-ASCII.
2009-09-10 11:05:13 -07:00
Edward Lee
e633a4dcea Remove mostly unused FaultTolerance service and fix up remaining references. 2009-08-31 17:17:20 -07:00
Edward Lee
c70241b5ce Bug 512457 - Report errors before they get eaten up by runInBatchMode
Save the exception from inside runBatched and not have runInBatchMode return failure, so we can then expose the exception.
2009-08-31 16:28:00 -07:00
Edward Lee
b8e1f6aad3 Bug 512637 - Use newlines instead of JSON collection for incremental parsing. r=thunder
Switch to newline mode when using a collection record handler, and look for newlines! Easy! Update test to provide newline-separated strings instead of JSON.
2009-08-26 18:09:41 -07:00
Edward Lee
009411f482 Bug 511746 - Resource.foo shouldn't throw except in exceptional cases. r=thunder
Get rid of lastChannel and return a String object from _request with additional properties of status, succeeded, headers -- even if the response was handled by cache. Update engines to check for non-success and throw the failure. Update tests to use these additional properties instead of lastChannel, etc.
2009-08-26 15:32:46 -07:00
Edward Lee
c4393b5e3b Handle holes in bookmark folders and fix up bookmarks to be at an earlier position if a hole was detected. 2009-08-19 19:32:05 -07:00
Edward Lee
4bb37a06d2 Add tests to make sure bookmarks are in the right position after creating/updating. 2009-08-19 18:15:12 -07:00
Edward Lee
6b910e2590 Share the logging _ code for tests. 2009-08-19 18:01:06 -07:00
Edward Lee
8a14a4dfd4 Bug 507691 - Server responds with json decode failure for fat unicode characters
Make sure we generate ASCII data for upload by escaping on serialize and unescaping on deserialize. Test to make sure serialized data is ASCII and the original records aren't modified by serialize.
2009-08-06 11:28:33 -07:00
Anant Narayanan
45673ccb67 WinCE crypto binary (bug #487171) 2009-07-28 17:14:52 -07:00
Anant Narayanan
a79e153fb9 Backed out changeset 9e8936813ae1 2009-07-28 17:13:15 -07:00
Anant Narayanan
7a7c271cd7 WinCE crypto binary 2009-07-28 16:54:24 -07:00
Edward Lee
a14ea8d26f Add i86pc machine detection for crypto Makefile. Add SunOS for test Makefiles. 2009-07-26 02:55:38 -07:00
Edward Lee
39607ef7b9 Bug 505940 - Unnecessarily uploading records on first sync
Remove short-circuit logic of comparing number of keys for deepEquals and iterate through each key on both objects to make sure both have the same value.
2009-07-22 23:49:15 -07:00
Edward Lee
a26f0b1166 Bug 485573 - Fennec runs out of memory and crashes if too many history items to sync. r=thunder
Incrementally process records as the collection finds record boundaries and converts them to records for the engine to use. Get rid of the collection iterator and original RecordParser. Add tests for incremental record parsing and remove old iter tests.
2009-07-22 16:38:34 -07:00
Anant Narayanan
3541ab1269 Expose rewrapPrivateKey & verifyPassphrase (bug #505401) 2009-07-21 15:02:30 -07:00
Anant Narayanan
0697eb1f5c Backed out changeset 5768a19f21d3 (crypto review not done yet) 2009-07-21 14:32:57 -07:00
Anant Narayanan
1509f1d1cb Crypto changes
--HG--
extra : rebase_source : 0a953a43c01b95e7c467ec4ca7feeb0aaa00f5e1
2009-07-21 11:18:29 -07:00
Mike Connor
6ccbc1e360 move password tests to need-work because they've been broken for a year
--HG--
rename : services/sync/tests/unit/test_passwords.js => services/sync/tests/unit/need-work/test_passwords.js
2009-07-16 11:51:10 -04:00
Edward Lee
e0f49d8631 merge weave. resolve Makefile storage_version changes. 2009-07-14 19:23:15 -07:00
Edward Lee
b935178671 Bug 504212 - Have javascript stack traces show [object Object] for various CryptoWrapper functions
Also update createKeypair for keys to pass around the passphrase object and update the tests to pass around an object.
2009-07-14 19:04:32 -07:00
Mike Connor
0d4506ba23 fix tests 2009-07-11 02:30:37 -04:00
Mike Connor
44bd8a8cb4 arglebargle 2009-07-11 01:20:45 -04:00
Edward Lee
f3b15e11d4 Remove async and wrap from test_load_modules. 2009-07-09 13:58:19 -07:00
Edward Lee
5c482eea0d merge weave. resolve comments added to resource.js. 2009-07-09 11:21:20 -07:00
Dan Mills
7626f0f740 switch from autogenerated load-module tests to a single test that loads all modules 2009-07-01 11:51:52 -07:00
Edward Lee
84c52a6411 merge weave. resolve addition of kSpecialIds to bookmarks.js near removal of Async.sugar. 2009-06-23 22:34:57 -07:00
Edward Lee
ad5f01ba04 Bug 493816 - Timestamps need to be saved as string prefs
Internally store .lastSync as a string but keep exposing set/getters as float values. parseFloat takes both strings and numbers and gives a number.

--HG--
extra : rebase_source : b657dd3f732b9f3b3b0ef208ee53e799aa87d2c6
2009-06-16 17:22:59 -07:00
Edward Lee
f69797ec49 Remove some async related code in head.js. 2009-06-09 14:48:49 -05:00
Edward Lee
1cd1e7d94e Convert test_auth_manager to sync. 2009-06-09 14:39:45 -05:00