Commit 50bf6049 authored by pedroGitt's avatar pedroGitt
Browse files

Update verifyEd25519Signature() to fix error message processing

parent 09fd7246
......@@ -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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment