- Authentication headers: enquote Realm (linphone)

This commit is contained in:
Thomas Ries
2004-05-09 11:26:57 +00:00
parent 2e78004b37
commit a644581c62
2 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
0.5.6
=====
09-May-2004: - Authentication headers: enquote Realm (linphone)
02-May-2004: - better recognition of redirected incoming requests
(linke INVITES from sipgate.de - SIP URI points to
(like INVITES from sipgate.de - SIP URI points to
the real wanted target but To: header only points to
the initially wanted target before the redirection)
- compiling on BSD (fwapi.c, custom_fw_module.c)
+10 -1
View File
@@ -90,6 +90,7 @@ int authenticate_proxy(osip_message_t *request) {
*/
int auth_include_authrq(osip_message_t *response) {
osip_proxy_authenticate_t *p_auth;
char *realm=NULL;
if (osip_proxy_authenticate_init(&p_auth) != 0) {
ERROR("proxy_authenticate_init failed");
@@ -98,7 +99,15 @@ int auth_include_authrq(osip_message_t *response) {
osip_proxy_authenticate_set_auth_type(p_auth, osip_strdup("Digest"));
osip_proxy_authenticate_set_nonce(p_auth, osip_strdup(auth_generate_nonce()));
osip_proxy_authenticate_set_realm(p_auth, osip_strdup(configuration.proxy_auth_realm));
realm=malloc(strlen(configuration.proxy_auth_realm)+3); /* add 2x" and \0 */
if (realm) {
sprintf(realm,"\"%s\"",configuration.proxy_auth_realm);
osip_proxy_authenticate_set_realm(p_auth, realm);
} else {
ERROR("unable to malloc() %i bytes for authentication realm",
strlen(configuration.proxy_auth_realm)+3);
return STS_FAILURE;
}
osip_list_add (response->proxy_authenticates, p_auth, -1);