diff options
author | pedroGitt <pedro.contreiras@amdocs.com> | 2016-10-26 15:08:39 +0200 |
---|---|---|
committer | pedroGitt <pedro.contreiras@amdocs.com> | 2016-10-26 15:08:39 +0200 |
commit | b0fc867bfe22a1253c0d28919b817d247122a06c (patch) | |
tree | f5df43bf1a48126017067276aac414f9eb480498 /java/android/OlmLibSdk/olm-sdk/src/main | |
parent | b140e481830a2d82152801724b004251f502d60e (diff) |
Update verifyEd25519Signature() unit test: add a test to detect a key length too small
- add logs in verifyEd25519SignatureJni() to print the key used
Diffstat (limited to 'java/android/OlmLibSdk/olm-sdk/src/main')
-rw-r--r-- | java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp index bd93de1..19a045b 100644 --- a/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp +++ b/java/android/OlmLibSdk/olm-sdk/src/main/jni/olm_utility.cpp @@ -121,6 +121,7 @@ JNIEXPORT jstring OLM_UTILITY_FUNC_DEF(verifyEd25519SignatureJni)(JNIEnv *env, j size_t keyLength = (size_t)env->GetStringUTFLength(aKey); size_t messageLength = (size_t)env->GetStringUTFLength(aMessage); LOGD(" ## verifyEd25519SignatureJni(): signatureLength=%lu keyLength=%lu messageLength=%lu",static_cast<long unsigned int>(signatureLength),static_cast<long unsigned int>(keyLength),static_cast<long unsigned int>(messageLength)); + LOGD(" ## verifyEd25519SignatureJni(): key=%s",keyPtr); size_t result = olm_ed25519_verify(utilityPtr, (void const *)keyPtr, @@ -132,7 +133,7 @@ JNIEXPORT jstring OLM_UTILITY_FUNC_DEF(verifyEd25519SignatureJni)(JNIEnv *env, j if(result == olm_error()) { const char *errorMsgPtr = olm_utility_last_error(utilityPtr); errorMessageRetValue = env->NewStringUTF(errorMsgPtr); - LOGE("## verifyEd25519SignatureJni(): failure - session creation Msg=%s",errorMsgPtr); + LOGE("## verifyEd25519SignatureJni(): failure - olm_ed25519_verify Msg=%s",errorMsgPtr); } else { |