Commit graph

856 commits

Author SHA1 Message Date
ylecollen
1c067b1cb6 remove the RTL support by default. 2016-12-21 13:01:12 +01:00
ylecollen
d741c012f3 identityKeys and oneTimeKeys return Map instead of JSON. 2016-12-21 12:58:00 +01:00
Richard van der Hoff
fb91b1f182 Merge pull request #41 from matrix-org/rav/js_tests
Add some tests for the Javascript wrappers
2016-12-20 12:03:07 +00:00
manuroe
46ad79517e OLMKit: More zeroing 2016-12-20 11:46:57 +01:00
ylecollen
c553d18a9a Update the readme files. 2016-12-20 10:42:06 +01:00
ylecollen
2fab6f946e Update the execution mode 2016-12-20 10:10:52 +01:00
manuroe
3540926b98 OLMKit: Reset intermediate buffers to zeroes 2016-12-19 18:10:37 +01:00
Richard van der Hoff
e2e398bd94 Add some tests for the Javascript wrappers
These would have helped avoid the recent FRV.
2016-12-19 09:43:58 +00:00
Richard van der Hoff
819f0d24db Merge pull request #40 from matrix-org/rav/fix_encryption
Avoid buffer overrun on encryption
2016-12-16 15:01:45 +00:00
Richard van der Hoff
8e554ab5ef Avoid buffer overrun on encryption
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-16 14:42:41 +00:00
Richard van der Hoff
7fd63bcac7 Merge pull request #39 from matrix-org/rav/messages_on_heap
Allocate memory for message blobs on the heap
2016-12-15 16:54:39 +00:00
Richard van der Hoff
09b3e1eecd typo 2016-12-15 16:28:30 +00:00
Richard van der Hoff
8356fa37ad zero out plaintext buffers
Avoid leaving copies of the plaintext sitting around in the emscripten heap.
2016-12-15 13:37:34 +00:00
Richard van der Hoff
2e04868c46 Merge pull request #38 from matrix-org/rav/handle_load_exceptions
Better handling of exceptions during loading, and import OLM_OPTIONS
2016-12-14 14:34:39 +00:00
Richard van der Hoff
76610c0a3a Allocate memory for message blobs on the heap
Messages can be very large, so we don't really want to allocate them on the
stack. Switch to using the heap for them, and try to clean up some of the
string handling while we're at it.
2016-12-14 12:05:56 +00:00
Richard van der Hoff
51b141ecb6 Let apps override emscripten settings
Read settings from OLM_OPTIONS to allow apps to configure some options. In
particular, this is useful for setting the heap size.
2016-12-14 11:46:12 +00:00
Richard van der Hoff
1bf807bf33 Better handling of exceptions during loading
If we get an exception during load, don't define half of window.Olm (which
confuses apps).

This is a partial fix to https://github.com/vector-im/riot-web/issues/2726.
2016-12-12 16:52:03 +00:00
pedroGitt
ac0ccb224d Update decryptMessage() API with the error message as an output parameter 2016-11-28 11:56:20 +01:00
pedroGitt
0263cd3039 Remove un used code 2016-11-28 11:53:54 +01:00
manuroe
aa12cbcac2 OLMKit: Make returned NSError provide the raw olm error string (ex:"UNKNOWN_MESSAGE_INDEX") in their NSLocalizedDescriptionKey.
NSLocalizedFailureReasonErrorKey can contain more contextual information.
2016-11-24 11:45:59 +01:00
pedroGitt
d3d3024ea2 Add missing gradle folder 2016-11-24 10:21:12 +01:00
pedroGitt
b3c2015616 Rename JNI API: getOlmLibVersion() => getOlmLibVersionJni() 2016-11-23 09:36:46 +01:00
pedroGitt
e63be97774 Update with master branch => OLM V2.0.0 2016-11-23 01:20:47 +01:00
pedroGitt
7a6897642b Merge remote-tracking branch 'origin/master' into pedroc/android_e2e_dev 2016-11-23 00:04:58 +01:00
pedroGitt
c725a561a2 Add lib version as sufix in the aar file name 2016-11-23 00:01:34 +01:00
manuroe
93926e9047 OLMKit: Fixed warnings in objc wrapper 2016-11-18 11:39:39 +01:00
manuroe
29de7825c9 OLMKit: Update Copyrights 2016-11-17 15:50:23 +01:00
manuroe
e19b7f54dc OLMKit: Improve wording 2016-11-17 14:43:04 +01:00
manuroe
32a5424971 OLMKit: Podfile.lock++ 2016-11-17 14:33:41 +01:00
manuroe
0b1ecbff2d OLMKit: Add it to olm from version 2.0.1 2016-11-17 14:03:15 +01:00
manuroe
7ee17a2957 OLMKit: Add missing implementations for matchesInboundSession matchesInboundSessionFrom 2016-11-14 17:35:24 +01:00
manuroe
aa70c8afbc OLMKit: Fix warning in OLMUtility 2016-11-14 17:06:34 +01:00
manuroe
bc697bf5e2 OLMKit: Fixed type-cast of messageIndex of [OLMInboundGroupSession decryptMessage] for 32 and 64bits platforms 2016-11-14 17:02:56 +01:00
manuroe
cf66af6f2e OLMKit: Replaced NSAsserts by NSErrors 2016-11-14 16:54:51 +01:00
pedroGitt
04fd4c5a13 Fix the decrypt issue (crash on V5.1.1) when the message to decrypt contains emojis:
- add an internal specific JNI function (javaCStringToUtf8()) to perform the UTF-8 conversion
- the SDK is configured to enable/disable the use of javaCStringToUtf8()
2016-11-14 11:56:37 +01:00
pedroGitt
d944d5fad7 Update initInboundSessionWithAccountFrom() return code:
- return code is a basic error code (0 OK, -1  KO)
Remove TODO comments
2016-11-08 11:25:10 +01:00
pedroGitt
1fd908c72a Light refactoring by using test helper methods getFingerprintKey() and getIdentityKey() 2016-11-08 11:21:45 +01:00
manuroe
27a8c28da4 OLMKit: Update obj-c wrapper to 2.0.0 2016-11-07 17:27:09 +01:00
manuroe
5d1b66c350 Merge remote-tracking branch 'origin/master' into olmkit 2016-11-07 17:21:39 +01:00
pedroGitt
c144d3fec5 Update test02AliceToBobBackAndForth() with a last sequence where Alice encrypts and Bob decrypts 2016-11-07 11:40:23 +01:00
pedroGitt
59bb145ceb Add new API to verify object release 2016-11-07 11:06:26 +01:00
pedroGitt
c71235d508 Fix javadoc header 2016-11-07 11:01:03 +01:00
pedroGitt
e71013b005 Set javadoc level to private 2016-11-07 11:00:01 +01:00
manuroe
62f5280670 OLMKit: podspec: Attempt to fix duplicate symbols because ed25519.c includes .c files 2016-11-04 11:07:36 +01:00
manuroe
9ac937a200 OLMKit: podspec: Attempt to fix duplicate symbols because ed25519.c includes .c files 2016-11-04 11:01:09 +01:00
manuroe
09b14c2b3d OLMKit: podspec: Some files are missing 2016-11-04 10:10:56 +01:00
manuroe
671218dc07 OLMKit: podspec: Some files are missing 2016-11-04 09:53:55 +01:00
manuroe
34998b52c7 OLMKit: Attempt to make podspec work when the pod is downloaded from git 2016-11-03 17:33:31 +01:00
pedroGitt
8041a7e0ef Refactoring serialization flow:
- New class CommonSerializeUtils: helper class dedicated to serialization, to contain common code to all the OlmXXX classes that require to be serialized
- make OlmXXX classes extending CommonSerializeUtils
2016-10-31 12:09:06 +01:00
pedroGitt
7a0d7cc36d Fix OlmException cast issue
- OlmException class extends now from IOException
- update corresponding serializing unit tests
 - update
2016-10-28 10:49:04 +02:00