aboutsummaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmUtility.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmUtility.java b/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmUtility.java
index a6e9c4f..2843f0f 100644
--- a/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmUtility.java
+++ b/java/android/OlmLibSdk/olm-sdk/src/main/java/org/matrix/olm/OlmUtility.java
@@ -78,20 +78,20 @@ public class OlmUtility implements Serializable {
*/
public boolean verifyEd25519Signature(String aSignature, String aFingerprintKey, String aMessage, StringBuffer aError) {
boolean retCode = false;
- String errorRetValue = null;
+ String jniError;
- if(null == aError) {
+ if (null == aError) {
Log.e(LOG_TAG, "## verifyEd25519Signature(): invalid input error parameter");
- }
- else if(TextUtils.isEmpty(aSignature) || TextUtils.isEmpty(aFingerprintKey) || TextUtils.isEmpty(aMessage)){
- Log.e(LOG_TAG, "## verifyEd25519Signature(): invalid input parameters");
} else {
aError.setLength(0);
- if( null == (errorRetValue = verifyEd25519SignatureJni(aSignature,aFingerprintKey, aMessage))) {
+ if (TextUtils.isEmpty(aSignature) || TextUtils.isEmpty(aFingerprintKey) || TextUtils.isEmpty(aMessage)) {
+ Log.e(LOG_TAG, "## verifyEd25519Signature(): invalid input parameters");
+ aError.append("JAVA sanity check failure - invalid input parameters");
+ } else if (null == (jniError = verifyEd25519SignatureJni(aSignature, aFingerprintKey, aMessage))) {
retCode = true;
} else {
- aError.append(errorRetValue);
+ aError.append(jniError);
}
}