Software /
code /
prosody
Comparison
util/sasl.lua @ 1657:1fe566011e2b
Moving realm at the beginning of the digest-md5 message send by the server.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Sun, 09 Aug 2009 21:19:03 +0200 |
parent | 1656:cf9220a364cd |
child | 1725:fb3137652ea6 |
comparison
equal
deleted
inserted
replaced
1656:cf9220a364cd | 1657:1fe566011e2b |
---|---|
68 local data = "" | 68 local data = "" |
69 | 69 |
70 if type(message) ~= "table" then error("serialize needs an argument of type table.") end | 70 if type(message) ~= "table" then error("serialize needs an argument of type table.") end |
71 | 71 |
72 -- testing all possible values | 72 -- testing all possible values |
73 if message["realm"] then data = data..[[realm="]]..message.realm..[[",]] end | |
73 if message["nonce"] then data = data..[[nonce="]]..message.nonce..[[",]] end | 74 if message["nonce"] then data = data..[[nonce="]]..message.nonce..[[",]] end |
74 if message["qop"] then data = data..[[qop="]]..message.qop..[[",]] end | 75 if message["qop"] then data = data..[[qop="]]..message.qop..[[",]] end |
75 if message["charset"] then data = data..[[charset=]]..message.charset.."," end | 76 if message["charset"] then data = data..[[charset=]]..message.charset.."," end |
76 if message["algorithm"] then data = data..[[algorithm=]]..message.algorithm.."," end | 77 if message["algorithm"] then data = data..[[algorithm=]]..message.algorithm.."," end |
77 if message["realm"] then data = data..[[realm="]]..message.realm..[[",]] end | |
78 if message["rspauth"] then data = data..[[rspauth=]]..message.rspauth.."," end | 78 if message["rspauth"] then data = data..[[rspauth=]]..message.rspauth.."," end |
79 data = data:gsub(",$", "") | 79 data = data:gsub(",$", "") |
80 return data | 80 return data |
81 end | 81 end |
82 | 82 |