mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 20:47:57 +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();
|
||||
}
|
||||
}
|
||||
if (!verifier.verify(verifierHostname, sslSocket.getSession())) {
|
||||
|
||||
final boolean verificationSuccessful;
|
||||
// Verify the TLS session.
|
||||
verificationSuccessful = verifier.verify(verifierHostname, sslSocket.getSession());
|
||||
if (!verificationSuccessful) {
|
||||
throw new CertificateException(
|
||||
"Hostname verification of certificate failed. Certificate does not authenticate "
|
||||
+ getXMPPServiceDomain());
|
||||
|
|
Loading…
Reference in a new issue