Software /
code /
prosody
Changeset
2995:175002d404b8
util.sasl.scram: Adjusting authentication backend name to conform with the style already used by the plain module.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sun, 28 Feb 2010 22:58:43 +0100 |
parents | 2994:b8448e181487 |
children | 2996:b0515ed4d9d7 |
files | util/sasl/scram.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/util/sasl/scram.lua Sun Feb 28 22:50:25 2010 +0100 +++ b/util/sasl/scram.lua Sun Feb 28 22:58:43 2010 +0100 @@ -129,7 +129,7 @@ self.state.salt = generate_uuid(); self.state.iteration_count = default_i; self.state.salted_password = Hi(HMAC_f, password, self.state.salt, default_i); - elseif self.profile["scram-"..hash_name] then + elseif self.profile["scram_"..hash_name] then salted_password, iteration_count, salt, state = self.profile["scram-"..hash_name](self.state.name, self.realm); if state == nil then return "failure", "not-authorized" elseif state == false then return "failure", "account-disabled" end @@ -177,7 +177,7 @@ function init(registerMechanism) local function registerSCRAMMechanism(hash_name, hash, hmac_hash) - registerMechanism("SCRAM-"..hash_name, {"plain", "scram-"..(hash_name:lower())}, scram_gen(hash_name:lower(), hash, hmac_hash)); + registerMechanism("SCRAM-"..hash_name, {"plain", "scram_"..(hash_name:lower())}, scram_gen(hash_name:lower(), hash, hmac_hash)); end registerSCRAMMechanism("SHA-1", sha1, hmac_sha1);