util.sasl.scram: Use self.profile.cb for detection whether channel binding is support...
authorTobias Markmann <tm@ayena.de>
Mon, 17 Jan 2011 15:50:21 +0000 (16:50 +0100)
committerTobias Markmann <tm@ayena.de>
Mon, 17 Jan 2011 15:50:21 +0000 (16:50 +0100)
util/sasl/scram.lua

index 76e9c152e21bb6fd1058d33afc3305aeabe05de5..cb50390d0f8130e0da988ba5a6c1ca8c4d27290f 100644 (file)
@@ -111,12 +111,12 @@ function getAuthenticationDatabaseSHA1(password, salt, iteration_count)
        return true, stored_key, server_key
 end
 
-local support_channel_binding = true;
-
 local function scram_gen(hash_name, H_f, HMAC_f)
        local function scram_hash(self, message)
                if not self.state then self["state"] = {} end
-       
+               local support_channel_binding = false;
+               if self.profile.cb then support_channel_binding = true; end
+               
                if type(message) ~= "string" or #message == 0 then return "failure", "malformed-request" end
                if not self.state.name then
                        -- we are processing client_first_message