Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sip/auth: SHA-256 digest algorithm support #1103

Merged
merged 6 commits into from
Apr 23, 2024
Merged

sip/auth: SHA-256 digest algorithm support #1103

merged 6 commits into from
Apr 23, 2024

Conversation

sreimers
Copy link
Member

@sreimers sreimers commented Apr 21, 2024

Fixes baresip/baresip#3006

Based on this PR:
#180

@juha-h
Copy link
Contributor

juha-h commented Apr 21, 2024

Thanks, tested against my SIP proxy and SHA-256 worked OK:

7:35:16.608#
TCP 192.168.80.215:39768 -> 192.168.80.215:5060
REGISTER sip:test.tutpro.com SIP/2.0
Via: SIP/2.0/TCP 192.168.80.215:39768;branch=z9hG4bK7b572126dbcd7ba2;rport
Contact: <sip:test-0x55a0985a9470@192.168.80.215:39768;transport=tcp>;expires=600;+sip.instance="<urn:uuid:9b21c1a8-dc58-a3d6-83d5-7be67cbe70ce>";q=0.5;reg-id=1
Max-Forwards: 70
Authorization: Digest username="test", realm="test.tutpro.com", nonce="ZiUjNGYlIgj2oWfgNirlAvhoI3l75iN58/OfYYbWcmZpIZ4YcPY+BCgCliOA", uri="sip:test.tutpro.com", response="57f13b8a41a9de02c889f5ac06a8f68d5f3d4f854793a3b96bbb8656c944b345", cnonce="adb3fde0c3d55418", qop=auth, nc=00000002, algorithm=SHA-256
Route: <sip:test.tutpro.com:5060;transport=tcp;lr>
To: <sip:test@test.tutpro.com>
From: "Test Account" <sip:test@test.tutpro.com>;tag=e28b54998bd5899b
Call-ID: 8358afd383d29500
CSeq: 47131 REGISTER
User-Agent: baresip v3.11.0 (x86_64/Linux)
Supported: gruu, outbound, path
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,NOTIFY,SUBSCRIBE,INFO,MESSAGE,UPDATE,REFER
Content-Length: 0


17:35:16.611#
TCP 192.168.80.215:5060 -> 192.168.80.215:39768
SIP/2.0 401 Unauthorized
Via: SIP/2.0/TCP 192.168.80.215:39768;branch=z9hG4bK7b572126dbcd7ba2;rport=39768;received=192.168.80.215
To: <sip:test@test.tutpro.com>;tag=8ab7da41edb07e5e798dd89feb609822.ecd6b501
From: "Test Account" <sip:test@test.tutpro.com>;tag=e28b54998bd5899b
Call-ID: 8358afd383d29500
CSeq: 47131 REGISTER
WWW-Authenticate: Digest realm="test.tutpro.com", nonce="ZiUlUGYlJCQSrIR7c79myuEXJQlPZoil8/OfYYbWcmZpIZ4YcPY+BCgCmSaA", qop="auth", stale=true, algorithm=SHA-256
Server: OpenSIPg SIP Proxy (5.8.1-0b01 (x86_64/linux))
Content-Length: 0


17:35:16.614#
TCP 192.168.80.215:39768 -> 192.168.80.215:5060
REGISTER sip:test.tutpro.com SIP/2.0
Via: SIP/2.0/TCP 192.168.80.215:39768;branch=z9hG4bK2b3d137e373796f1;rport
Contact: <sip:test-0x55a0985a9470@192.168.80.215:39768;transport=tcp>;expires=600;+sip.instance="<urn:uuid:9b21c1a8-dc58-a3d6-83d5-7be67cbe70ce>";q=0.5;reg-id=1
Max-Forwards: 70
Authorization: Digest username="test", realm="test.tutpro.com", nonce="ZiUlUGYlJCQSrIR7c79myuEXJQlPZoil8/OfYYbWcmZpIZ4YcPY+BCgCmSaA", uri="sip:test.tutpro.com", response="f99b395637adef79ac457f7b27db8f070762c605e6faf641c1ff2135a2a96986", cnonce="591d20b93850ffbb", qop=auth, nc=00000001, algorithm=SHA-256
Route: <sip:test.tutpro.com:5060;transport=tcp;lr>
To: <sip:test@test.tutpro.com>
From: "Test Account" <sip:test@test.tutpro.com>;tag=e28b54998bd5899b
Call-ID: 8358afd383d29500
CSeq: 47132 REGISTER
User-Agent: baresip v3.11.0 (x86_64/Linux)
Supported: gruu, outbound, path
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,NOTIFY,SUBSCRIBE,INFO,MESSAGE,UPDATE,REFER
Content-Length: 0


17:35:16.630#
TCP 192.168.80.215:5060 -> 192.168.80.215:39768
SIP/2.0 200 OK
Via: SIP/2.0/TCP 192.168.80.215:39768;branch=z9hG4bK2b3d137e373796f1;rport=39768;received=192.168.80.215
To: <sip:test@test.tutpro.com>;tag=8ab7da41edb07e5e798dd89feb609822.754bb501
From: "Test Account" <sip:test@test.tutpro.com>;tag=e28b54998bd5899b
Call-ID: 8358afd383d29500
CSeq: 47132 REGISTER
Contact: <sip:test-0x55a0985a9470@192.168.80.215:39768;transport=tcp>;q=0.5;expires=600;received="sip:192.168.80.215:39768;transport=tcp";pub-gruu="sip:test@test.tutpro.com;gr=urn:uuid:9b21c1a8-dc58-a3d6-83d5-7be67cbe70ce";temp-gruu="sip:uloc-66252203-8a1e-1-d00c1e4e@test.tutpro.com;gr";+sip.instance="<urn:uuid:9b21c1a8-dc58-a3d6-83d5-7be67cbe70ce>";reg-id=1
Supported: outbound
Require: outbound
Server: OpenSIPg SIP Proxy (5.8.1-0b01 (x86_64/linux))
Content-Length: 0

@sreimers sreimers marked this pull request as ready for review April 22, 2024 07:20
@sreimers sreimers merged commit 0e13821 into main Apr 23, 2024
37 checks passed
@sreimers sreimers deleted the sip_sha256 branch April 23, 2024 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SHA-256 support in baresip
2 participants