mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
[sasl] Rename getChannelBindingName() to getGs2CbindFlag()
As this returns the value of the SCRAM gs2-cbind-flag.
This commit is contained in:
parent
0eeb89409a
commit
91337150e7
2 changed files with 11 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright 2014-2019 Florian Schmaus
|
* Copyright 2014-2020 Florian Schmaus
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -227,7 +227,7 @@ public abstract class ScramMechanism extends SASLMechanism {
|
||||||
authzidPortion = "a=" + authorizationId;
|
authzidPortion = "a=" + authorizationId;
|
||||||
}
|
}
|
||||||
|
|
||||||
String cbName = getChannelBindingName();
|
String cbName = getGs2CbindFlag();
|
||||||
assert StringUtils.isNotEmpty(cbName);
|
assert StringUtils.isNotEmpty(cbName);
|
||||||
|
|
||||||
return cbName + ',' + authzidPortion + ",";
|
return cbName + ',' + authzidPortion + ",";
|
||||||
|
@ -244,7 +244,13 @@ public abstract class ScramMechanism extends SASLMechanism {
|
||||||
return ByteUtils.concat(gs2Header, cbindData);
|
return ByteUtils.concat(gs2Header, cbindData);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getChannelBindingName() {
|
/**
|
||||||
|
* Get the SCRAM GSS-API Channel Binding Flag value.
|
||||||
|
*
|
||||||
|
* @return the gs2-cbind-flag value.
|
||||||
|
* @see <a href="https://tools.ietf.org/html/rfc5802#section-6">RFC 5802 § 6.</a>
|
||||||
|
*/
|
||||||
|
protected String getGs2CbindFlag() {
|
||||||
// Check if we are using TLS and if a "-PLUS" variant of this mechanism is enabled. Assuming that the "-PLUS"
|
// 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
|
// 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.
|
// the "-PLUS" variant, as otherwise we would have tried it.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright 2016-2019 Florian Schmaus
|
* Copyright 2016-2020 Florian Schmaus
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -43,7 +43,7 @@ public abstract class ScramPlusMechanism extends ScramMechanism {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getChannelBindingName() {
|
protected String getGs2CbindFlag() {
|
||||||
return "p=tls-server-end-point";
|
return "p=tls-server-end-point";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue