aboutsummaryrefslogtreecommitdiff
path: root/javascript
AgeCommit message (Collapse)Author
2019-10-09release 3.1.43.1.4Hubert Chathi
2019-10-04Pass in a buffer to olm_session_describeDavid Baker
instead of having a static one, as that could end up taking up a lot of memory if your app keeps olm sessions hanging about.
2019-10-01Add olm_session_describeDavid Baker
As a way to dump the state of an olm session, ie. the chain indicies, so we can debug why olm sessions break and get out of sync.
2019-06-24release 3.1.33.1.3Hubert Chathi
2019-04-30release 3.1.23.1.2Hubert Chathi
2019-04-29bump version number for 3.1.13.1.1Hubert Chathi
2019-04-17prepare for 3.1.0 releaseHubert Chathi
2019-04-08re-add null termination in javascriptHubert Chathi
because older versions of emscripten don't support the length argument to UTF8ToString.
2019-04-08javascript: Switch from deprecated Pointer_stringify() to UTF8toString().Damir Jelić
The Pointer_stringify() function is deprecated and has a couple of issues because it tries to guess the encoding of the buffer. In some cases it can ignore the length parameter which could end up in inconsistencies. Switch to UTF8toString() that takes a length parameter and respects, that way we don't need to allocate an additional byte for a NULL byte.
2019-04-02add support for an incorrect KDF that snuck into Riot 1.0Hubert Chathi
2019-03-13rename functions to be more consistentHubert Chathi
2019-02-01call the right function and remove unnecessary includeHubert Chathi
2019-01-29Add signing class to the pk moduleDavid Baker
2019-01-21initial implementation of short authentication string generationHubert Chathi
2018-10-23prepare release 3.0.0Hubert Chathi
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.