Age | Commit message (Collapse) | Author |
|
Allows building an WASM-ready archive with emscripten.
This allows e.g. to compile to the `wasm32-unknown-unknown`
target with Rust.
Related matrix-rust-sdk PR:
https://github.com/matrix-org/matrix-rust-sdk/pull/31
Signed-off-by: stoically <stoically@protonmail.com>
|
|
This confuses emscripten now
|
|
Without this, it's not possible to run the install or install-debug
rules multiple times.
Signed-off-by: Trygve Aaberge <trygveaa@gmail.com>
|
|
because emscripted has dropped support for the old flag and us
setting it is now breaking the build.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mostly because the standard emscripten docker image does not have
libjson-perl, but python always comes with json. But also because
it was impenetrable.
|
|
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.
|
|
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.
|
|
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).
|
|
This patch adds the ability to build the bindings without having a
globally installed Olm C library.
Provided that the C library is already built, the tests can be run now
with make test.
Signed-off-by: Damir Jelić <poljar@termina.org.uk>
|
|
|
|
The code for this change is taken from
https://stackoverflow.com/a/30225575/4929236
This patch is Signed-Off-By: Marcel Radzio <marcel@radzio-sh.de>
|
|
|
|
Signed-off-by: Andreas Zwinkau <qznc@web.de>
|
|
Add functions to make the difference between the native and the java code version.
Factor out the version management in the makefiles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
|
|
|
|
|
|
|
|
... because OSX doesn't support it.
|
|
Ed25519 private keys, it turns out, have 64 bytes, not 32.
We were previously generating only 32 bytes (which is all that is required to
generate the public key), and then using the public key as the upper 32 bytes
when generating the per-message session key. This meant that everything
appeared to work, but the security of the private key was severely compromised.
By way of fixes:
* Use the correct algorithm for generating the Ed25519 private key, and store
all 512 bits of it.
* Update the account pickle format and refuse to load the old format (since we
should consider it compromised).
* Bump the library version, and add a function to retrieve the library
version, so that applications can verify that they are linked against a
fixed version of the library.
* Remove the curve25519_{sign, verify} functions which were unused and of
dubious quality.
|
|
|
|
|
|
This makes the user able to use the familiar `make install` syntax, and
allows overriding of the default directories using the DESTDIR and
PREFIX variables, for example:
make DESTDIR=packaging PREFIX=/usr install
|
|
This provides users of this library the guarantee that the ABI will
stay stable when MAJOR will reach 1, and will stay backwards compatible
for the entire duration of the 1.x.y branch.
It does require the maintainers to always update the version in the
Makefile at every ABI change.
|
|
|
|
|
|
|
|
sha256.c and aes.c contain conflicting declarations, so we need to compile them
as separate units. This requires a bit more Makefile-shuffling; the build
directory now includes 'src' or 'lib' as appropriate, and we just mkdir -p
before each compilation.
|
|
|
|
|
|
|
|
think this got lost when mark added separate release/debug builds
|
|
Some of the crypto libs rely on UINT64_C, which in glibc 2.17 and earlier was
not defined for C++ code (see
https://sourceware.org/bugzilla/show_bug.cgi?id=15366).
|
|
|
|
|