Commit graph

60 commits

Author SHA1 Message Date
Trygve Aaberge
e267825bb7 Makefile: Overwrite symlinks in install and install-debug
Without this, it's not possible to run the install or install-debug
rules multiple times.

Signed-off-by: Trygve Aaberge <trygveaa@gmail.com>
2019-08-08 09:29:14 -07:00
David Baker
c31ab73704 Drop support for old emscripten
because emscripted has dropped support for the old flag and us
setting it is now breaking the build.
2019-01-30 18:16:48 +00:00
Hubert Chathi
94f664e725
initial implementation of short authentication string generation 2019-01-21 23:21:41 -05:00
Hubert Chathi
5cf074d337 Merge branch 'master' into poljar 2018-10-12 17:02:51 -04:00
David Baker
82534708a3 Merge remote-tracking branch 'origin/master' into dbkr/ci2 2018-10-10 20:08:55 +01:00
Hubert Chathi
44f78cf4fe
Merge branch 'master' into dbkr/wasm 2018-10-09 17:38:32 -04:00
David Baker
713e9aeb4d Build on mac 2018-10-05 15:35:21 -04:00
David Baker
602c00a8d6 Dual-build wasm and asm.js olm 2018-10-04 20:09:54 +01:00
David Baker
877166dedc Merge branch 'dbkr/wasm' into dbkr/ci2 2018-10-03 16:22:13 +01:00
David Baker
3e775938e5 Replace the impenetrable line of perl with python
Mostly because the standard emscripten docker image does not have
libjson-perl, but python always comes with json. But also because
it was impenetrable.
2018-10-03 16:06:15 +01:00
David Baker
263b94428a Another day, another interface
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-25 17:13:29 +01:00
David Baker
5e87db615a Make OLM_OPTIONS work again
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-21 16:35:17 +01:00
David Baker
122867c45c WebAssembly support!
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-09-21 16:01:51 +01:00
Damir Jelić
ac071d9c0d python: Enable build with the local build of the Olm C library.
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>
2018-07-18 17:44:32 -04:00
Hubert Chathi
128d45cc83 add initial implementation of basic private key encryption functionality 2018-06-27 16:38:45 -04:00
MTRNord
4065c8e11a Update Makefile to support building on Windows
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>
2018-04-12 10:51:16 +01:00
Richard van der Hoff
bb05b5687f Makefile: fix tab/space substitution. 2017-03-29 10:44:54 +01:00
Andreas Zwinkau
b0a010b153 Support building as a static library
Signed-off-by: Andreas Zwinkau <qznc@web.de>
2017-03-24 10:20:49 +00:00
Yannick LE COLLEN
a9aeb6b5d7 Android : improve the version number management (#46)
Add functions to make the difference between the native and the java code version.

Factor out the version management in the makefiles.
2017-03-02 12:01:32 +00:00
Richard van der Hoff
77eaaa3d5f prepare v2.2.2 2017-03-01 16:21:37 +00:00
Richard van der Hoff
b185229c2b Prep v2.2.1 2017-01-18 18:16:32 +00:00
Richard van der Hoff
150c360e82 Bump version numbers to 2.2.0 2017-01-18 16:03:02 +00:00
Richard van der Hoff
86b64b653a Bump version numbers throughout 2016-12-22 15:03:00 +00:00
manuroe
0b1ecbff2d OLMKit: Add it to olm from version 2.0.1 2016-11-17 14:03:15 +01:00
Richard van der Hoff
f6c05be8c5 Add a document on signing keys 2016-10-27 11:55:48 +01:00
Richard van der Hoff
27c7b4a767 Version bump for 2.0.0 2016-10-25 11:35:20 +01:00
Richard van der Hoff
8a8d100ee5 Makefile: install-headers is phony 2016-09-23 12:22:34 +01:00
Emmanuel Gil Peyrot
7c9b2f6395 Add a Makefile rule to install the headers
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
2016-09-23 12:17:44 +01:00
Richard van der Hoff
c07444d3e6 First stab at a megolm spec 2016-09-22 11:04:19 +01:00
Mark Haines
ec7d968623 Changelog and version bump for 1.3.0 2016-09-14 13:55:54 +01:00
Richard van der Hoff
49ca6aca98 Bump version numbers to 1.2.0 2016-09-06 22:26:24 +01:00
Richard van der Hoff
c09aa77c4a Avoid ldconfig in the Makefile
... because OSX doesn't support it.
2016-09-05 11:56:53 +01:00
Richard van der Hoff
0c462cff11 Fix Ed25519 keypair generation
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.
2016-09-01 13:35:23 +01:00
Richard van der Hoff
d30db7b5c0 Makefile rules to build the rst into html 2016-07-11 14:50:49 +01:00
Richard van der Hoff
f3b9c3bbbb Prepare 1.0.0 release 2016-07-11 12:50:11 +01:00
Emmanuel Gil Peyrot
c8d00665b3 Add an install and an install-debug targets
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
2016-07-05 23:21:28 +01:00
Emmanuel Gil Peyrot
06cdb3f75e Specify the soname in the library and its name
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.
2016-07-05 23:21:22 +01:00
Richard van der Hoff
952a3e15cf Merge branch 'rav/group_chat_js_bindings' 2016-05-26 13:58:14 +01:00
Mark Haines
bfeb554e86 Add a fuzzer for olm_group_decrypt 2016-05-26 13:25:34 +01:00
Richard van der Hoff
013f27f3dc Javascript bindings for group sessions 2016-05-25 17:48:01 +01:00
Richard van der Hoff
ee8172d882 Compile some of the crypto libs directly
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.
2016-05-25 17:08:44 +01:00
Richard van der Hoff
54d43010c8 Merge branch 'rav/jenkins_build' 2016-05-25 15:33:33 +01:00
Mark Haines
024685f3db Merge branch 'markjh/fuzzingII' 2016-05-25 14:32:03 +01:00
Richard van der Hoff
ed039d331c Merge branch 'master' into rav/jenkins_build 2016-05-24 16:30:23 +01:00
Richard van der Hoff
8d31f42b1e Build the tests with -g
think this got lost when mark added separate release/debug builds
2016-05-24 16:28:14 +01:00
Richard van der Hoff
15cb4ec0c0 Build the crypto libs as C99
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).
2016-05-24 14:41:49 +01:00
Richard van der Hoff
4f1bb49d20 Rename olm.hh to olm.h 2016-05-23 18:55:05 +01:00
Richard van der Hoff
e21d5cb222 Fix warnings and set -Werror 2016-05-23 18:08:22 +01:00
Mark Haines
f47aabd094 Add support for building fuzzers using american fuzzy lop
Builds fuzzers using http://lcamtuf.coredump.cx/afl/
2016-05-23 17:32:24 +01:00
Mark Haines
aacf115468 Fix make clean to remove the library and all the .d files 2016-05-23 16:35:34 +01:00