Software / code / prosody
Comparison
plugins/mod_saslauth.lua @ 5834:c0cc4e73d9fa
mod_saslauth: Add channel binding handler for tls-unique channel binding.
| author | Tobias Markmann <tm@ayena.de> |
|---|---|
| date | Mon, 17 Jan 2011 16:50:21 +0100 |
| parent | 5832:7d100d917243 |
| child | 5838:a2659baf8332 |
comparison
equal
deleted
inserted
replaced
| 5833:b1fa865ee6b2 | 5834:c0cc4e73d9fa |
|---|---|
| 244 if not origin.username then | 244 if not origin.username then |
| 245 if secure_auth_only and not origin.secure then | 245 if secure_auth_only and not origin.secure then |
| 246 return; | 246 return; |
| 247 end | 247 end |
| 248 origin.sasl_handler = usermanager_get_sasl_handler(module.host); | 248 origin.sasl_handler = usermanager_get_sasl_handler(module.host); |
| 249 | |
| 250 if origin.secure then | 249 if origin.secure then |
| 250 origin.sasl_handler:add_cb_handler("tls-unique", function(self) | |
| 251 return self.userdata:getpeerfinished(); | |
| 252 end); | |
| 251 origin.sasl_handler["userdata"] = origin.conn:socket(); | 253 origin.sasl_handler["userdata"] = origin.conn:socket(); |
| 252 end | 254 end |
| 253 features:tag("mechanisms", mechanisms_attr); | 255 features:tag("mechanisms", mechanisms_attr); |
| 254 for mechanism in pairs(origin.sasl_handler:mechanisms()) do | 256 for mechanism in pairs(origin.sasl_handler:mechanisms()) do |
| 255 if mechanism ~= "PLAIN" or origin.secure or allow_unencrypted_plain_auth then | 257 if mechanism ~= "PLAIN" or origin.secure or allow_unencrypted_plain_auth then |