<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 10.04.2023 14:07, Yury Kirsanov
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAD1_seumrNVWmXX+i4KcT+vaSNjwwW3icvczSWXL3aCjCRnvrQ@mail.gmail.com">I'm
actually NOT using any type of DB, hence the problem, how do I
specify multiple hashes with $var(password) for different auth
types, as per the documentation?</blockquote>
<p><font face="monospace">I think there is a bit of confusion on the
"timings" when the multi-algorithm "xxx_challenge()" function is
used vs. the single-algorithm reply verification for the client
step. As such:</font></p>
<p><font face="monospace">* during the challenge step, you simply
invoke xxx_challenge(MD5, SHA256), to advertise multiple
challenge headers to the client<br>
* during the verification step, you are supposed to read the <b>$auth.alg</b>,
thus "learning" what the auth algorithm the client selected (<b>modern</b><b></b>
phone vs. <b>classic</b> phone, i.e. SHA256 or MD5), then<br>
populate <b>$var(password)</b><b> </b>with the
corresponding hash selected from your cache or database<br>
</font></p>
<p><font face="monospace">Hope this helps,<br>
</font></p>
<pre class="moz-signature" cols="72">--
Liviu Chircu
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/liviuchircu">www.twitter.com/liviuchircu</a> | <a class="moz-txt-link-abbreviated" href="http://www.opensips-solutions.com">www.opensips-solutions.com</a>
OpenSIPS Summit 2023 Houston, May 23-26 | <a class="moz-txt-link-abbreviated" href="http://www.opensips.org/events">www.opensips.org/events</a></pre>
</body>
</html>