Commit Graph

361 Commits (04fd4c5a1301545419fb72533c57e4253085bdc0)

Author SHA1 Message Date
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
pedroGitt d6824a4f49 Revert loadLibrary as static. 2016-10-26 18:12:38 +02:00
pedroGitt b0fc867bfe Update verifyEd25519Signature() unit test: add a test to detect a key length too small
- add logs in verifyEd25519SignatureJni() to print the key used
2016-10-26 15:08:39 +02:00
pedroGitt b140e48183 Add missing copyright header
Add sanity tests for OlmAccount and OlmSession
Add a first version of MatchInboundSession
2016-10-25 18:21:50 +02:00
pedroGitt 232de794f2 Update return code for initOutboundSessionWithAccount() and initInboundSessionWithAccount():
An error code is now returned, no utility to return the object itself (initial implementation matching iOS)
2016-10-25 18:18:40 +02:00
pedroGitt eb2052ba05 Update due to renaming in olm_account.cpp (maxOneTimeKeysJni() & generateOneTimeKeysJni())
Fix removeOneTimeKeysForSession() default return code
2016-10-25 18:16:19 +02:00
pedroGitt a6401c72e6 Update olm_matches_inbound_session_(from)() return code processing 2016-10-25 18:14:39 +02:00
pedroGitt f3d4789b58 Renaming:
- generateOneTimeKeys => generateOneTimeKeysJni
- maxOneTimeKeys => maxOneTimeKeysJni
2016-10-25 18:13:44 +02:00
pedroGitt 1af282fb37 Add new file: test helper methods 2016-10-25 10:21:15 +02:00
pedroGitt 6b3cb69ded Fix compiler warnings
- for 32bits platform target
- when debug flag is not defined
2016-10-24 17:21:28 +02:00
pedroGitt acafa69c67 Add possibility to define NDK_DEBUG flag 2016-10-24 17:14:35 +02:00
pedroGitt 3ec91b849b Add possibility to define NDK_DEBUG flag 2016-10-24 16:51:03 +02:00
pedroGitt c485bf1d53 Update comments 2016-10-24 15:31:59 +02:00
pedroGitt 3f60e62827 Add missing account releaseAccount for test01VerifyEd25519Signing() 2016-10-24 15:30:55 +02:00
pedroGitt 332d9d0c09 Add serialization for inbound group session
- remove compiler warnings when logs are not enabled
- new getInstanceId() function to refactor code
2016-10-23 23:55:45 +02:00
pedroGitt fae857582c Add serialization for outbound group session 2016-10-21 19:05:20 +02:00
pedroGitt 71f57b79e5 Update android platform to 16 2016-10-21 19:03:18 +02:00
pedroGitt 700b02589c Add getRandomKey() 2016-10-21 19:00:46 +02:00
pedroGitt fb87d8feee Serialization for OlmAccount and OlmSession OK 2016-10-21 18:09:20 +02:00
pedroGitt 1511962df1 Add serialization feature to OlmAccount
- new JNI API: serializeDataWithKeyJni() and initWithSerializedDataJni()
- update account unit test
- modify OlmAccount constructor API: an exception may be thrown
2016-10-20 17:42:57 +02:00
pedroGitt 8b050e5e1e Local variable renaming 2016-10-20 17:40:20 +02:00
pedroGitt 50bf60499a Update verifyEd25519Signature() to fix error message processing 2016-10-20 17:39:09 +02:00
pedroGitt 09fd7246ea Format update 2016-10-20 17:36:53 +02:00
pedroGitt 0cb45abdf3 Update logs 2016-10-20 17:36:20 +02:00
pedroGitt 867ef94ced First update with serialization mechanism 2016-10-20 14:40:59 +02:00
pedroGitt 250af95330 First update with serialization mechanism 2016-10-20 14:40:10 +02:00
pedroGitt e45c03c9e0 Add new exception message for deserialization 2016-10-19 18:18:12 +02:00
pedroGitt 5b524efc44 Update due to the de/serialization API 2016-10-19 15:23:19 +02:00
pedroGitt 26d9934fc8 Fix verifyEd25519Signature() API to properly return the error message in case signature verification failed
- update unit tests
2016-10-18 19:02:18 +02:00
pedroGitt a6913c49c2 Fix javadoc header comment 2016-10-18 19:00:23 +02:00
pedroGitt 139402611a Add OlmUtility class
- add unit tests for OlmUtility
- rename OlmGroupTest to OlmGroupSessionTest
- update OlmException
2016-10-18 16:05:28 +02:00
pedroGitt 034fa6be40 - Add new API for OlmUtility
- Introducing namespace AndroidOlmSdk
- Fix logs (function names mixed up)
- Add new check based on the calling java object instance type (IsInstanceOf())
- Fix return value for getXXXInstanceId() in case of failure. Now 0 is returned.
2016-10-18 15:59:36 +02:00
pedroGitt 4ccc45ab0a - Update Javadoc for keys constants definitions
- change return code from removeOneTimeKeysForSession() (direct value from JNI is now returned)
2016-10-17 16:58:19 +02:00
pedroGitt b6cf3f1eec Update Javadoc method headers with direct link to PRE_KEY definition 2016-10-17 16:55:14 +02:00