Set security error status on TLS cert mismatch
This commit is contained in:
parent
d2388a5a7e
commit
17cec63c14
|
@ -596,8 +596,9 @@ public class XmppConnection implements Runnable {
|
|||
if (verifier != null
|
||||
&& !verifier.verify(account.getServer().getDomainpart(),
|
||||
sslSocket.getSession())) {
|
||||
account.setStatus(Account.State.SECURITY_ERROR);
|
||||
sslSocket.close();
|
||||
throw new IOException("host mismatch in TLS connection");
|
||||
throw new IOException("Host mismatch in TLS connection");
|
||||
}
|
||||
tagReader.setInputStream(sslSocket.getInputStream());
|
||||
tagWriter.setOutputStream(sslSocket.getOutputStream());
|
||||
|
|
Loading…
Reference in a new issue