Software /
code /
prosody
Comparison
util/sasl/scram.lua @ 5833:b1fa865ee6b2
util.sasl.scram: Use self.profile.cb for detection whether channel binding is supported or not.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Mon, 17 Jan 2011 16:50:21 +0100 |
parent | 5829:40c16475194e |
child | 5835:a5f4de8c0b40 |
comparison
equal
deleted
inserted
replaced
5832:7d100d917243 | 5833:b1fa865ee6b2 |
---|---|
109 local stored_key = sha1(hmac_sha1(salted_password, "Client Key")) | 109 local stored_key = sha1(hmac_sha1(salted_password, "Client Key")) |
110 local server_key = hmac_sha1(salted_password, "Server Key"); | 110 local server_key = hmac_sha1(salted_password, "Server Key"); |
111 return true, stored_key, server_key | 111 return true, stored_key, server_key |
112 end | 112 end |
113 | 113 |
114 local support_channel_binding = true; | |
115 | |
116 local function scram_gen(hash_name, H_f, HMAC_f) | 114 local function scram_gen(hash_name, H_f, HMAC_f) |
117 local function scram_hash(self, message) | 115 local function scram_hash(self, message) |
118 if not self.state then self["state"] = {} end | 116 if not self.state then self["state"] = {} end |
119 | 117 local support_channel_binding = false; |
118 if self.profile.cb then support_channel_binding = true; end | |
119 | |
120 if type(message) ~= "string" or #message == 0 then return "failure", "malformed-request" end | 120 if type(message) ~= "string" or #message == 0 then return "failure", "malformed-request" end |
121 if not self.state.name then | 121 if not self.state.name then |
122 -- we are processing client_first_message | 122 -- we are processing client_first_message |
123 local client_first_message = message; | 123 local client_first_message = message; |
124 log("debug", client_first_message); | 124 log("debug", client_first_message); |