diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 6 | ||||
-rw-r--r-- | src/main/res/values/strings.xml | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index dc2728540..0fb8a90fd 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -1379,7 +1379,7 @@ public class XmppConnectionService extends Service { if (message.fixCounterpart()) { conversation.startOtrSession(message.getCounterpart().getResourcepart(), true); } else { - Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": could not fix counterpart for OTR message to contact " + message.getContact().getJid()); + Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": could not fix counterpart for OTR message to contact " + message.getCounterpart()); break; } } else { @@ -2006,6 +2006,10 @@ public class XmppConnectionService extends Service { try { X509Certificate[] chain = KeyChain.getCertificateChain(XmppConnectionService.this, alias); Pair<Jid, String> info = CryptoHelper.extractJidAndName(chain[0]); + if (info == null) { + callback.informUser(R.string.certificate_does_not_contain_jid); + return; + } if (findAccountByJid(info.first) == null) { Account account = new Account(info.first, ""); account.setPrivateKeyAlias(alias); diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 0cb129c93..c8e8c216a 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -782,4 +782,5 @@ <string name="pref_validate_hostname">Validate hostname with DNSSEC</string> <string name="pref_validate_hostname_summary">Server certificates that contain the validated hostname are considered verified</string> <string name="network_is_unreachable">Network is unreachable</string> + <string name="certificate_does_not_contain_jid">Certificate does not contain a Jabber ID</string> </resources> |