mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 03:52:06 +01:00
Introduce verificationSuccessful boolean
This commit is contained in:
parent
f60e4055ec
commit
2ceadc0de1
1 changed files with 5 additions and 1 deletions
|
@ -879,7 +879,11 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
verifierHostname = getXMPPServiceDomain().toString();
|
verifierHostname = getXMPPServiceDomain().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!verifier.verify(verifierHostname, sslSocket.getSession())) {
|
|
||||||
|
final boolean verificationSuccessful;
|
||||||
|
// Verify the TLS session.
|
||||||
|
verificationSuccessful = verifier.verify(verifierHostname, sslSocket.getSession());
|
||||||
|
if (!verificationSuccessful) {
|
||||||
throw new CertificateException(
|
throw new CertificateException(
|
||||||
"Hostname verification of certificate failed. Certificate does not authenticate "
|
"Hostname verification of certificate failed. Certificate does not authenticate "
|
||||||
+ getXMPPServiceDomain());
|
+ getXMPPServiceDomain());
|
||||||
|
|
Loading…
Reference in a new issue