aboutsummaryrefslogtreecommitdiff
path: root/javascript
AgeCommit message (Collapse)Author
2020-09-23SAS: add olm_sas_is_their_key_setSaúl Ibarra Corretgé
Also make olm_sas_generate_bytes fail if their key wasn't set.
2020-09-01Merge branch 'master' into uhoreg/fallbackHubert Chathi
2020-08-31allow some things to be Uint8Array, and fix some TypeScript declarationsHubert Chathi
2020-08-14add support for fallback keysHubert Chathi
2020-07-04Fix group demo to work with > 2 usersSaúl Ibarra Corretgé
Add 4 by default, and make sure OT keys are not reused.
2020-06-11bump version info for release3.1.5Hubert Chathi
2020-05-16fix group demo to work with Olm.init()Matthew Hodgson
2020-05-16fix 1:1 demo to work with Olm.init()Matthew Hodgson
2020-05-16spell out error msg if you don't Olm.initMatthew Hodgson
2020-05-13add a note about calling Olm.initHubert Chathi
2020-05-07fix type signature of unpickle in Inbound/OutboundGroupSessionHubert Chathi
Thanks to Dominic Fischer for spotting.
2020-04-29add missing declaration for PkDecryption#decrypt and SAS classHubert Chathi
2020-04-24add declarations for Inbound/OutboundGroupSessionHubert Chathi
2020-04-24initial TypeScript definition fileHubert Chathi
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