diff options
author | Tobias Markmann <tm@ayena.de> | 2010-02-28 22:58:43 +0100 |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2010-02-28 22:58:43 +0100 |
commit | 263683d8c2bbb471ac3527d0bc106064c834d045 (patch) | |
tree | e5a95d66452b67b36e7692cddeaff58191260c37 /util/sasl | |
parent | 965aa9476a77678ed1a7c2ea58954eebd6c6bb9b (diff) | |
download | prosody-263683d8c2bbb471ac3527d0bc106064c834d045.tar.gz prosody-263683d8c2bbb471ac3527d0bc106064c834d045.zip |
util.sasl.scram: Adjusting authentication backend name to conform with the style already used by the plain module.
Diffstat (limited to 'util/sasl')
-rw-r--r-- | util/sasl/scram.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/sasl/scram.lua b/util/sasl/scram.lua index 1ceeae47..b813137a 100644 --- a/util/sasl/scram.lua +++ b/util/sasl/scram.lua @@ -129,7 +129,7 @@ local function scram_gen(hash_name, H_f, HMAC_f) 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 @@ end 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); |