From 3d1cf61caff092d03649619819b2ebcb42e1de68 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 18 Mar 2017 13:37:54 +0100 Subject: [PATCH] Add comment to ScramMechanism.getChannelBindingName() --- .../java/org/jivesoftware/smack/sasl/core/ScramMechanism.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramMechanism.java b/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramMechanism.java index edeedb665..4209083c1 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramMechanism.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramMechanism.java @@ -249,6 +249,9 @@ public abstract class ScramMechanism extends SASLMechanism { } protected String getChannelBindingName() { + // Check if we are using TLS and if a "-PLUS" variant of this mechanism is enabled. Assuming that the "-PLUS" + // variants always have precedence before the non-"-PLUS" variants this means that the server did not announce + // the "-PLUS" variant, as otherwise we would have tried it. if (sslSession != null && connectionConfiguration.isEnabledSaslMechanism(getName() + "-PLUS")) { // Announce that we support Channel Binding, i.e., the '-PLUS' flavor of this SASL mechanism, but that we // believe the server does not.