Comparison

util/sasl/scram.lua @ 5841:1b0c7e7c6be8

Only advertise mechanisms needing channel binding if a channel binding backend is avaliable.
author Tobias Markmann <tm@ayena.de>
date Mon, 07 Feb 2011 13:24:42 +0100
parent 5840:4b484e8feafc
child 5843:fb6573e191cf
comparison
equal deleted inserted replaced
5840:4b484e8feafc 5841:1b0c7e7c6be8
247 function init(registerMechanism) 247 function init(registerMechanism)
248 local function registerSCRAMMechanism(hash_name, hash, hmac_hash) 248 local function registerSCRAMMechanism(hash_name, hash, hmac_hash)
249 registerMechanism("SCRAM-"..hash_name, {"plain", "scram_"..(hashprep(hash_name))}, scram_gen(hash_name:lower(), hash, hmac_hash)); 249 registerMechanism("SCRAM-"..hash_name, {"plain", "scram_"..(hashprep(hash_name))}, scram_gen(hash_name:lower(), hash, hmac_hash));
250 250
251 -- register channel binding equivalent 251 -- register channel binding equivalent
252 registerMechanism("SCRAM-"..hash_name.."-PLUS", {"plain", "scram_"..(hashprep(hash_name))}, scram_gen(hash_name:lower(), hash, hmac_hash)); 252 registerMechanism("SCRAM-"..hash_name.."-PLUS", {"plain", "scram_"..(hashprep(hash_name))}, scram_gen(hash_name:lower(), hash, hmac_hash), {"tls-unique"});
253 end 253 end
254 254
255 registerSCRAMMechanism("SHA-1", sha1, hmac_sha1); 255 registerSCRAMMechanism("SHA-1", sha1, hmac_sha1);
256 end 256 end
257 257