David Baker
b2d91f55ec
Merge pull request #62 from matrix-org/dbkr/ci2
...
CircleCI Build Support
2018-10-12 08:13:45 +01:00
David Baker
82534708a3
Merge remote-tracking branch 'origin/master' into dbkr/ci2
2018-10-10 20:08:55 +01:00
David Baker
3cfcf1615d
Merge pull request #57 from matrix-org/dbkr/wasm
...
WebAssembly support
2018-10-10 20:07:19 +01:00
David Baker
1dbb060c44
Add note about passing through env var with docker
2018-10-10 19:41:12 +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
Hubert Chathi
2cbba061c3
Merge branch 'master' into dbkr/ci2
2018-10-05 14:54:29 -04:00
Hubert Chathi
0a25ec137f
Merge branch 'master' into dbkr/wasm
2018-10-05 10:50:01 -04:00
Hubert Chathi
173339ae9a
add more comments describing the pk encrypt/decrypt functions
2018-10-05 10:35:09 -04:00
Hubert Chathi
bad14db8da
remove unneeded polyfill
2018-10-05 10:35:09 -04:00
Hubert Chathi
8520168e0b
fix some code style issues and typos
2018-10-05 10:35:09 -04:00
David Baker
602c00a8d6
Dual-build wasm and asm.js olm
2018-10-04 20:09:54 +01:00
David Baker
031eb2dc75
...in the right dir
2018-10-03 16:26:17 +01:00
David Baker
8161fa51a8
run npm install
2018-10-03 16:24:21 +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
b1beadacee
CircleCI config file
2018-10-03 15:59:45 +01:00
David Baker
9b652bb127
Merge pull request #58 from matrix-org/dbkr/method_consistency
...
Call appropriate wrapper function
2018-10-02 12:10:29 +01:00
David Baker
00384ba87a
Merge remote-tracking branch 'origin/master' into dbkr/wasm
2018-10-02 10:15:14 +01:00
David Baker
04f58bb0c9
Merge pull request #59 from matrix-org/dbkr/fix_trailing_newlines
...
Remove trailing letter 'K's from the test pubkeys
2018-10-02 10:04:14 +01:00
David Baker
2835110cee
Remove trailing letter 'K's from the test pubkeys
...
base64 encoded newlines somehow?
2018-10-01 20:01:47 +01:00
David Baker
b51d75392b
Merge remote-tracking branch 'origin/master' into dbkr/wasm
2018-10-01 16:14:39 +01:00
David Baker
0ad32c9896
Call appropriate wrapper function
...
Don't think this matters since there's no PkEncryption /
PkDecryption object being passed, but for the sake of consistency
2018-10-01 13:22:04 +01:00
Matthew Hodgson
8f6e0557ee
oops, fix typo - thanks to @dest4
2018-09-27 18:45:00 +01:00
David Baker
c4a3918686
Support passing olm options into init()
2018-09-26 16:38:39 +01:00
David Baker
498562fa65
Breking change
2018-09-25 18:03:31 +01:00
David Baker
dfbe8a4796
Return same promise if init() called many times
...
So we only init the library once.
2018-09-25 17:48:17 +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
f29d8cdd7b
Also ship the wasm file
2018-09-21 16:39:04 +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
David Baker
d6cd18df40
Merge pull request #55 from matrix-org/dbkr/pk_key_length
...
Fix output buffer length check
2018-09-20 11:30:27 +01:00
David Baker
65d4ac19c8
Fix output buffer length check
...
...when generating a key in PkDecryption.
The pubkey is base64ed on the output, so will be longer.
2018-09-19 14:10:12 +01:00
Hubert Chathi
ed02c217e6
update address for sending feedback for olm
2018-08-15 22:03:48 -04:00
Richard van der Hoff
0dc27f73c4
Request patches to olm@matrix.org
2018-07-09 11:53:13 +01:00
Hubert Chathi
98e8ee1b0d
prepare 2.3.0
2018-07-04 15:24:44 -04:00
Hubert Chathi
dac2c1064e
use void in type signatures for functions with no arguments
2018-06-28 17:13:52 -04:00
Hubert Chathi
f709b062bb
add functions for pickling/unpickling a decryption object
2018-06-28 17:10:36 -04:00
Hubert Chathi
3ed0ec226c
add termination
2018-06-28 17:03:46 -04:00
Hubert Chathi
b91c77721d
improve public key encryption unit test
2018-06-28 15:11:53 -04:00
Hubert Chathi
307309c69b
add initial version of Android wrapper for public key API
2018-06-27 18:49:48 -04:00
Hubert Chathi
552da6eafe
use the correct method to get the random length
2018-06-27 17:36:55 -04:00
Hubert Chathi
128d45cc83
add initial implementation of basic private key encryption functionality
2018-06-27 16:38:45 -04:00
Hubert Chathi
6a2a2741e8
fix some comments
2018-06-27 16:35:15 -04:00
Benoit Marty
28e0c4baca
Improve .gitignore: exclude generated files for test
2018-06-27 14:00:20 -04:00
Benoit Marty
6f2145337b
Comment out proxy settings
2018-06-27 14:00:20 -04:00
Benoit Marty
44c5923522
Upgrade tools
...
gradle 2.14.1 to 4.7
build tools 21.1.2 to 27.0.3
build gradle 2.1.3 to 3.1.3
2018-06-27 14:00:20 -04:00
Benoit Marty
ed7649d71e
Compiling with last NDK + some hardening
...
Patch received in https://github.com/matrix-org/olm/issues/13
2018-06-27 14:00:20 -04:00
Benoit Marty
08e50693b7
ignore generated files
2018-06-27 14:00:20 -04:00
Benoit Marty
9550d6cebc
Fix null pointer dereference
...
Patch has been received by e-mail, Signed-off-by: Arnaud Fontaine <arnaud.fontaine@ssi.gouv.fr>
2018-06-27 14:00:20 -04:00