Skip to content

Commit 2ceadc0

Browse files
committed
Introduce verificationSuccessful boolean
1 parent f60e405 commit 2ceadc0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,11 @@ else if (keyStoreType != null) {
879879
verifierHostname = getXMPPServiceDomain().toString();
880880
}
881881
}
882-
if (!verifier.verify(verifierHostname, sslSocket.getSession())) {
882+
883+
final boolean verificationSuccessful;
884+
// Verify the TLS session.
885+
verificationSuccessful = verifier.verify(verifierHostname, sslSocket.getSession());
886+
if (!verificationSuccessful) {
883887
throw new CertificateException(
884888
"Hostname verification of certificate failed. Certificate does not authenticate "
885889
+ getXMPPServiceDomain());

0 commit comments

Comments
 (0)