creytiv / re

Generic library for real-time communications with async IO support

Home Page:http://creytiv.com/re.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auth won't work for binary passwords containing zero byte characters

balgillo opened this issue · comments

https://github.com/creytiv/re/blob/master/include/re_sip.h#L239:

typedef int(sip_auth_h)(char **username, char **password, const char *realm,
			void *arg);

This won't work for a password containing a zero byte character, because that will be misinterpreted as the string terminator. The callback signature would need to be changed so that the callback function can provide the length of the password, either via a struct that includes a length such as struct mbuf, or via a separate out parameter.

Binary passwords are needed for AKAv1, for example.