Reset key alias on decryption failure

This commit is contained in:
M66B
2019-12-12 14:39:55 +01:00
parent 41ef71b541
commit e6fae9b076

View File

@@ -4524,8 +4524,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
Log.w(ex);
}
if (is == null)
if (is == null) {
if (message.identity != null)
db.identity().setIdentitySignKeyAlias(message.identity, null);
throw new IllegalArgumentException(context.getString(R.string.title_invalid_key));
}
// Decode message
Properties props = MessageHelper.getSessionProperties();