Comparison

util/sasl/scram.lua @ 3124:21e60658767d

Merge 0.7->trunk
author Matthew Wild <mwild1@gmail.com>
date Mon, 24 May 2010 19:46:12 +0100
parent 3121:27f895bac9c0
parent 3123:0f21abc745ef
child 3154:104f05235cef
comparison
equal deleted inserted replaced
3121:27f895bac9c0 3124:21e60658767d
162 if not succ then 162 if not succ then
163 log("error", "Generating salted password failed. Reason: %s", self.state.salted_password); 163 log("error", "Generating salted password failed. Reason: %s", self.state.salted_password);
164 return "failure", "temporary-auth-failure"; 164 return "failure", "temporary-auth-failure";
165 end 165 end
166 elseif self.profile["scram_"..hashprep(hash_name)] then 166 elseif self.profile["scram_"..hashprep(hash_name)] then
167 local salted_password, iteration_count, salt, state = self.profile["scram-"..hash_name](self.state.name, self.realm); 167 local salted_password, iteration_count, salt, state = self.profile["scram_"..hashprep(hash_name)](self.state.name, self.realm);
168 if state == nil then return "failure", "not-authorized" 168 if state == nil then return "failure", "not-authorized"
169 elseif state == false then return "failure", "account-disabled" end 169 elseif state == false then return "failure", "account-disabled" end
170 170
171 self.state.salted_password = salted_password; 171 self.state.salted_password = salted_password;
172 self.state.iteration_count = iteration_count; 172 self.state.iteration_count = iteration_count;