# Asterisk parsing dtls fingerprint wrong?

**URL:** <https://hub.soprani.ca/t/asterisk-parsing-dtls-fingerprint-wrong/371>\
**Category:** Issues\
**Tags:** cheogram-sip, fixed\
**Created:** [March 6, 2023, 4:41pm UTC](https://hub.soprani.ca/t/asterisk-parsing-dtls-fingerprint-wrong/371 "2023-03-06T16:41:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![singpolyma](https://hub.soprani.ca/user_avatar/hub.soprani.ca/singpolyma/32/11_2.png) [@singpolyma](https://hub.soprani.ca/u/singpolyma)\
**Post date:** [March 6, 2023, 4:41pm UTC](https://hub.soprani.ca/t/asterisk-parsing-dtls-fingerprint-wrong/371/1 "2023-03-06T16:41:54Z")

</div>

023-03-04 | 02:18:11 PM dilinger: singpolyma: K. Wanna fix that bug in master, then? Dino is sending an xml stanza for session-accept with (NS stuff removed for brevity): \<{ice-udp:1}:transport {:ice-udp:1}:ufrag=‘puL2’ {:ice-udp:1}:pwd=‘9/n4a…’\> \<{:dtls:0}:fingerprint {:dtls:0}:hash=‘sha-256’ {:dtls:0}:setup=‘active’\> EF:F1:2C…:0A:40:26:D7:92:78:4E \</{:dtls:0}:fingerprint\> [various other xml nodes] \</{:ice-udp:1}:transport\> . The function jingle\_interpret\_ice\_udp\_transport() in channels/chan\_motif.c first calls iks\_find\_attrib(transport, “ufrag”), which searches the transport node for ufrag; that looks correct. Then later, iks\_find\_with\_attrib(transport, “transport”, “xmlns”, DTLS\_NS) searches the _child_ nodes of transport for an xml tag name of “transport” and returns it. Then it looks for attributes that are in the fingerprint xml tag (ie, iks\_find\_attrib(fingerprint\_node, “hash”); ). It should really be looking for the “fingerprint” tag, not “transport”.  
2023-03-04 | 02:19:30 PM dilinger: singpolyma: Unless, of course, Dino is sending the wrong thing in that case. I don’t have debugging set up in another non-Dino client yet to see what they’re sending.  
2023-03-04 | 02:23:18 PM singpolyma: Hmm, yeah, I think probably there is no tag named “transport” with namespace DTLS\_NS so that does sound like maybe a bug of some kind

---

<div class="post-metadata">

**Author:** ![singpolyma](https://hub.soprani.ca/user_avatar/hub.soprani.ca/singpolyma/32/11_2.png) [@singpolyma](https://hub.soprani.ca/u/singpolyma)\
**Post date:** [March 6, 2023, 4:42pm UTC](https://hub.soprani.ca/t/asterisk-parsing-dtls-fingerprint-wrong/371/2 "2023-03-06T16:42:16Z")

</div>

2023-03-04 | 03:15:15 PM dilinger: singpolyma: I’m also not convinced that psycotica0’s fix was correct. Rather than pulling in the fingerprint node and reading attributes from that, their fix ([https://git.sr.ht/~psycotica0/asterisk/commit/a0316d474387129a079cd5eb6cf581f568b3b634](https://git.sr.ht/~psycotica0/asterisk/commit/a0316d474387129a079cd5eb6cf581f568b3b634)) was to grab the (I think?) first child node of the transport

---

<div class="post-metadata">

**Author:** ![singpolyma](https://hub.soprani.ca/user_avatar/hub.soprani.ca/singpolyma/32/11_2.png) [@singpolyma](https://hub.soprani.ca/u/singpolyma)\
**Post date:** [March 8, 2023, 4:27pm UTC](https://hub.soprani.ca/t/asterisk-parsing-dtls-fingerprint-wrong/371/3 "2023-03-08T16:27:08Z")

</div>

cherry picked [https://git.singpolyma.net/asterisk/commit/9641a83a6b449bfa6271aef87a7a0ece6da0192e](https://git.singpolyma.net/asterisk/commit/9641a83a6b449bfa6271aef87a7a0ece6da0192e) and [https://git.singpolyma.net/asterisk/commit/8c27f4845651319e6edb07189f9454b5b970960a](https://git.singpolyma.net/asterisk/commit/8c27f4845651319e6edb07189f9454b5b970960a) not sure why they never made it to master honestly
