On 3/21/20 11:35, Robert Dyck wrote:
Here is an example using the command line.Given user [email protected] with password huh Hash 1 [rdyck@blacky ~]$ echo -n "2:192.168.1.2:huh" | md5sum dce1ddb931719bf0f9ebfbf3d7e88d77 Completing the authorization requires two more hashes. Hash 2 echo -n "REGISTER:sip:192.168.1.2" | md5sum e2cdec7afb0cc21674cceb668555438b Hash 3 uses the previous hashes and the nonce - HA1:nonce:HA2[rdyck@blacky ~]$ echo -n "dce1ddb931719bf0f9ebfbf3d7e88d77:5e7653cb00001dc2090a257e1725869dd3ad5f2a0c5426b0:e2cdec7afb0cc21674cceb668555438b" | md5sum 847caaf31fe4c371b1cacea53de87253- this would be the response to an authorization request.An actual registration - verify the response hash Session Initiation Protocol (REGISTER) Request-Line: REGISTER sip:192.168.1.2 SIP/2.0 Message HeaderVia: SIP/2.0/UDP 192.168.1.3:53845;branch=z9hG4bKe6b621d8a65eb39e;rport Contact: <sip:[email protected]:53845>;expires=3840;+sip.instance="<urn:uuid:827173ac-5761-2b65-4493-94ca86baf98a>"Max-Forwards: 70Authorization: Digest username="2", realm="192.168.1.2", nonce="5e7653cb00001dc2090a257e1725869dd3ad5f2a0c5426b0", uri="sip:192.168.1.2", response="847caaf31fe4c371b1cacea53de87253"To: <sip:[email protected]> From: <sip:[email protected]>;tag=dadb5f2f513c33a3 Call-ID: 0b5e6ca4907cdebf [Generated Call-ID: 0b5e6ca4907cdebf] CSeq: 29774 REGISTER User-Agent: baresip v0.6.5 (x86_64/linux) Allow:INVITE,ACK,BYE,CANCEL,OPTIONS,NOTIFY,SUBSCRIBE,INFO,MESSAGE,REFER Content-Length: 0 On Saturday, March 21, 2020 9:52:34 A.M. PDT Sean M. Pappalardo wrote: > Hello. > > I'm trying to prepare XML config files for my clients and want to use > hashes instead of passwords. How does linphone calculate the hashes it > stores in the config file? This should be in the wiki. > > I've looked at the source code for liblinphone but all I can find is > reference to a function called belle_sip_auth_helper_compute_ha1 which > isn't actually defined in the source, so where is it?? > > Sincerely, > Sean M. Pappalardo > Sr. Networks Engineer > Renegade Technologies
-- Sean M. Pappalardo Sr. Networks Engineer Renegade Technologies
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Linphone-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/linphone-users
