mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-25 08:58:55 -05:00
do not crash on some very rare logging
This commit is contained in:
parent
ed4a190793
commit
4a43df8c97
@ -1275,7 +1275,7 @@ public class XmppConnectionService extends Service {
|
|||||||
if (message.fixCounterpart()) {
|
if (message.fixCounterpart()) {
|
||||||
conversation.startOtrSession(message.getCounterpart().getResourcepart(), true);
|
conversation.startOtrSession(message.getCounterpart().getResourcepart(), true);
|
||||||
} else {
|
} 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;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1838,6 +1838,10 @@ public class XmppConnectionService extends Service {
|
|||||||
try {
|
try {
|
||||||
X509Certificate[] chain = KeyChain.getCertificateChain(XmppConnectionService.this, alias);
|
X509Certificate[] chain = KeyChain.getCertificateChain(XmppConnectionService.this, alias);
|
||||||
Pair<Jid, String> info = CryptoHelper.extractJidAndName(chain[0]);
|
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) {
|
if (findAccountByJid(info.first) == null) {
|
||||||
Account account = new Account(info.first, "");
|
Account account = new Account(info.first, "");
|
||||||
account.setPrivateKeyAlias(alias);
|
account.setPrivateKeyAlias(alias);
|
||||||
|
@ -760,4 +760,5 @@
|
|||||||
<string name="pref_validate_hostname">Validate hostname with DNSSEC</string>
|
<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="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="network_is_unreachable">Network is unreachable</string>
|
||||||
|
<string name="certificate_does_not_contain_jid">Certificate does not contain a Jabber ID</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user