Commit graph

103 commits

Author SHA1 Message Date
ylecollen
2070de4fc5 initInboundSessionWithAccount triggers an exception when it fails. 2017-01-03 17:20:18 +01:00
ylecollen
45a98c20a8 EncryptMessage triggers an exception when it fails 2017-01-03 16:41:04 +01:00
ylecollen
9552e14fda -> the byte[] to String conversions are done on Java level (when it is possible)
-> remove javaCStringToUtf8
2017-01-03 16:12:20 +01:00
ylecollen
765647cda5 There is more GetStringUTFChars call. 2017-01-03 14:14:56 +01:00
ylecollen
de962ef8d7 encryptMessage : the UTF8 conversion is done on JAVA side. 2017-01-03 11:38:43 +01:00
ylecollen
e7c7d77a8a Comments update 2017-01-03 11:04:22 +01:00
ylecollen
5e948b1ac4 Add exception checks 2017-01-03 11:04:06 +01:00
ylecollen
c8c7a8ad19 -> simplify OlmSession.DecryptMessage
-> Always use javaCStringToUtf8 to convert byte array to String
2017-01-03 10:46:56 +01:00
ylecollen
65352d05aa ->Replace 2 spaces tabs by 4 spaces.
->fix the NULL and 0 pointer comparisons mixes
2017-01-03 09:32:59 +01:00
ylecollen
b03cdebfb5 Update the tab size to 4 spaces 2017-01-02 17:10:59 +01:00
ylecollen
5e0bbe7702 Rename getUnreleasedCount to isReleased. 2017-01-02 16:29:44 +01:00
ylecollen
47a52dcf41 Use a 4 spaces tabulation 2017-01-02 16:02:17 +01:00
ylecollen
8f3d5bed72 Fix tabulations mix and split block of variables when it is possible. 2017-01-02 15:32:14 +01:00
ylecollen
f4ae0d86c9 getOlmAccountId is aonly public in the OLM SDK package 2017-01-02 15:28:42 +01:00
ylecollen
b893b81c82 Simplify signMessageJni 2017-01-02 14:41:54 +01:00
ylecollen
60bcf865d0 remove useless "new string" 2017-01-02 14:19:22 +01:00
ylecollen
2a7c191d84 identityKeys / oneTimeKeys : remove useless try/catch blocks 2017-01-02 14:18:12 +01:00
ylecollen
da2e1c5902 setRandomInBuffer : clear tempByteArray content 2017-01-02 14:01:45 +01:00
ylecollen
2593c69a8a Update the copyrights 2016-12-22 11:12:41 +01:00
ylecollen
c3eb050be2 signMessage : the utf8 conversion is done on Java side. 2016-12-21 18:37:34 +01:00
ylecollen
e17eb69048 create a dedicated file for olm_manager. 2016-12-21 17:47:21 +01:00
ylecollen
e6d634f9db move getOlmLibVersionJni to the bottom 2016-12-21 16:31:56 +01:00
ylecollen
2e77e39579 move getOlmLibVersionJni 2016-12-21 16:26:07 +01:00
ylecollen
ffb40326ff Fix a potential memory leak. 2016-12-21 15:17:53 +01:00
ylecollen
643165067f setRandomInBuffer uses java.lang.SecureRandom. 2016-12-21 15:10:54 +01:00
ylecollen
bacdc3c539 Add an encoding type while converting byte[] to string 2016-12-21 13:06:51 +01:00
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
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
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
c725a561a2 Add lib version as sufix in the aar file name 2016-11-23 00:01:34 +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
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
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
pedroGitt
0d3c1a2a46 Fix javadoc header comments 2016-10-28 10:02:06 +02:00
pedroGitt
724d9ea20b Add new API to provide the SDK version 2016-10-27 18:47:14 +02:00
pedroGitt
1f1cbf2b3e Add new tests for multiple creations of account and outbound group sessions: check random generation function in JNI works properly 2016-10-27 18:14:04 +02:00
pedroGitt
6348a45515 Introduce a new log file (ENABLE_JNI_LOG) to disable/enable logs in JNI side 2016-10-27 18:02:38 +02:00
pedroGitt
8dbc2b50d5 Remove unsecure logs (keys value were printed)
Rename local parameter properly
2016-10-27 17:54:30 +02:00
pedroGitt
6f6d33c7eb Update test01VerifyEd25519Signing() with a real message 2016-10-27 17:24:16 +02:00
pedroGitt
31f8fe23c5 Fix random issue: increase random seed precision to micro sec
- previously the random seed was seconds based, and it could originate identical identity keys for different OlmAccount
2016-10-27 11:44:33 +02:00
pedroGitt
6204fcd128 Add javadoc auto generation:
- add a buildJavaDoc task in build.gradle
- update classes javadoc headers
2016-10-26 18:15:37 +02:00