aboutsummaryrefslogtreecommitdiff
path: root/javascript
AgeCommit message (Collapse)Author
2018-10-23include the non-wasm version in the packageHubert Chathi
2018-10-16zero buffers in the JavaScript bindingsHubert Chathi
2018-10-16also ignore the non-wasm JS fileHubert Chathi
2018-10-10Merge remote-tracking branch 'origin/master' into dbkr/pk_private_export_importDavid Baker
2018-10-05Merge branch 'master' into dbkr/pk_private_export_importHubert Chathi
2018-10-05Merge branch 'master' into dbkr/wasmHubert Chathi
2018-10-05remove unneeded polyfillHubert Chathi
2018-10-05fix some code style issues and typosHubert Chathi
2018-10-04Dual-build wasm and asm.js olmDavid Baker
2018-10-02Add an export for the length of a private keyDavid Baker
2018-10-02Work with PkDecryption keys by their private keysDavid Baker
Change interface to allow the app to get the private part of the key and instantiate a decryption object from just the private part of the key. Changes the function generating a key from random bytes to be initialising a key with a private key (because it's exactly the same thing). Exports & imports private key parts as ArrayBuffer at JS level rather than base64 assuming we are moving that way in general.
2018-10-01Call appropriate wrapper functionDavid Baker
Don't think this matters since there's no PkEncryption / PkDecryption object being passed, but for the sake of consistency
2018-09-26Support passing olm options into init()David Baker
2018-09-25Return same promise if init() called many timesDavid Baker
So we only init the library once.
2018-09-25Another day, another interfaceDavid Baker
Change the interface again, hopefully this time a bit more normal. Now we wrap the emscripten module completely and just expose the high level objects. The olm library export is now imported as normal (ie. returns a module rather than a function returning a module) but has an `init` method which *must* be called. This returns a promise which resolves when the module is ready. It also rejects if the module failed to set up, unlike before (and unlike the promise-not-a-promise that emscripten returns). Generally catch failures to init the module.
2018-09-21Also ship the wasm fileDavid Baker
2018-09-21Make OLM_OPTIONS work againDavid Baker
The closure compiler was just renaming the variable so it never would have picked them up. Make it an extern so it knows what to do.
2018-09-21WebAssembly support!David Baker
Quite a lot going on in this PR: * Updates to support recent emscripten, switching to WASM which is now the default * Use emscripten's MODULARIZE option rather than wrapping it ourself, since doing so in pre-post js doesn't work anymore. * Most changes are moving the emscripten runtime functions to top-level calls rather than in the Module object. * Get rid of duplicated NULL_BYTE_PADDING_LENGTH * Fix ciphertext_length used without being declared * Fix things that caused the closure compiler to error, eg. using OLM_OPTIONS without a declaration. * Wait until module is inited to do OLM_ERROR = olm_error() The main BREAKING CHANGE here is that the module now needs to initialise asyncronously (because it has to load the wasm file). require()ing olm now gives a function which needs to be called to create an instance. The resulting object has a promise-like then() method that can be used to detect when the module is ready. (We could use MODULARIZE_INSTANCE to return the module directly as before, rather than the function, but then we don't get the .then() method).
2018-07-04prepare 2.3.02.3.0Hubert Chathi
2018-06-28add functions for pickling/unpickling a decryption objectHubert Chathi
2018-06-28add terminationHubert Chathi
2018-06-27use the correct method to get the random lengthHubert Chathi
2018-06-27add initial implementation of basic private key encryption functionalityHubert Chathi
2018-01-09patch for libolm: fix some typos in JavaScript libraryHubert Chathi
From 4a82d31e8cb808a04956fc847ed0ec0ff322b956 Mon Sep 17 00:00:00 2001 From: Hubert Chathi <hubert@uhoreg.ca> Date: Wed, 3 Jan 2018 21:37:43 -0500 Subject: [PATCH] fix some typos in JavaScript library Signed-off-by: Hubert Chathi <hubert@uhoreg.ca>
2017-03-01prepare v2.2.22.2.2Richard van der Hoff
2017-01-18Prep v2.2.12.2.1Richard van der Hoff
2017-01-18Bump version numbers to 2.2.02.2.0Richard van der Hoff
2017-01-09Implement importing group session dataRichard van der Hoff
olm_import_inbound_group_session, which reads the format written by olm_export_inbound_group_session to initialise a group session.
2017-01-06Enable exporting inbound group session keysRichard van der Hoff
A pair of functions which allow you to export the megolm keys for an inbound group session, so that an application can save/restore them.
2016-12-22Bump version numbers throughout2.1.0Richard van der Hoff
2016-12-19Add some tests for the Javascript wrappersRichard van der Hoff
These would have helped avoid the recent FRV.
2016-12-16Avoid buffer overrun on encryptionRichard van der Hoff
Make sure we null-terminate encrypted strings before passing them to UTF8ToString. This used to work when we allocated the buffer on the stack, because it turns out that allocate() zeroinits the returned memory. malloc(), of course, does not.
2016-12-15Merge pull request #39 from matrix-org/rav/messages_on_heapRichard van der Hoff
Allocate memory for message blobs on the heap
2016-12-15typoRichard van der Hoff
2016-12-15zero out plaintext buffersRichard van der Hoff
Avoid leaving copies of the plaintext sitting around in the emscripten heap.
2016-12-14Allocate memory for message blobs on the heapRichard van der Hoff
Messages can be very large, so we don't really want to allocate them on the stack. Switch to using the heap for them, and try to clean up some of the string handling while we're at it.
2016-12-14Let apps override emscripten settingsRichard van der Hoff
Read settings from OLM_OPTIONS to allow apps to configure some options. In particular, this is useful for setting the heap size.
2016-12-12Better handling of exceptions during loadingRichard van der Hoff
If we get an exception during load, don't define half of window.Olm (which confuses apps). This is a partial fix to https://github.com/vector-im/riot-web/issues/2726.
2016-10-25Version bump for 2.0.02.0.0Richard van der Hoff
2016-10-20Return the message index when decrypting group messages.Mark Haines
Applications can use the index to detect replays of the same message.
2016-09-14Changelog and version bump for 1.3.01.3.0Mark Haines
2016-09-14Fix the group javascript demoMark Haines
2016-09-13Merge remote-tracking branch 'matrix/master'Mark Haines
2016-09-13Merge pull request #23 from matrix-org/markjh/remove_message_indexMark Haines
Remove the messsage index from olm_init_inbound_group_session
2016-09-13Remove the messsage index from olm_init_inbound_group_session since it is ↵Mark Haines
read from the session_key
2016-09-13Add a olm_inbound_group_session_id methodMark Haines
2016-09-06call double ratchet what it isMatthew Hodgson
2016-09-06Bump version numbers to 1.2.01.2.0Richard van der Hoff
2016-09-06Clean up some typosRichard van der Hoff
Remove redundant args from some js funcs, and fix a comment typo
2016-09-05Fix error handling for group sessionsRichard van der Hoff
Fix a couple of places where we were using the wrong method to get the last error.