[Freeswitch-svn] [commit] r8181 - freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip

Freeswitch SVN mikej at freeswitch.org
Wed Apr 23 14:37:18 EDT 2008


Author: mikej
Date: Wed Apr 23 14:37:18 2008
New Revision: 8181

Modified:
   freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c

Log:
Fri Apr 18 06:55:45 EDT 2008  Pekka.Pessi at nokia.com
  * torture_sip.c: added test for sip_header_as_string() producing string longer than 128

Fri Apr 18 06:55:45 EDT 2008  Pekka.Pessi at nokia.com
  UNDO: torture_sip.c: added test for sip_header_as_string() producing string longer than 128

Wed Apr 23 13:56:40 EDT 2008  Pekka.Pessi at nokia.com
  * torture_sip.c: added test for sip_header_as_string() producing string longer than 128



Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c	(original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/sip/torture_sip.c	Wed Apr 23 14:37:18 2008
@@ -2247,6 +2247,31 @@
   END();
 }
 
+static int test_www_authenticate(void)
+{
+  sip_www_authenticate_t *www;
+  su_home_t *home;
+  char const *s;
+  BEGIN();
+
+  TEST_1(home = su_home_create());
+  TEST_1(www = sip_www_authenticate_make
+	 (home, "Digest realm=\"Registered_Subscribers\",\n"
+	  "domain=\"sip:206.229.26.61\",\n"
+	  "nonce=\"20dfb7e5a77abee7a02dbe53efe42cdd\", "
+	  "opaque=\"423767123y723742376423762376423784623782a794e58\",\n"
+	  "stale=FALSE,algorithm=MD5"));
+  TEST_S(www->au_scheme, "Digest");
+  TEST_1(www->au_params && www->au_params[0] && www->au_params[1] && www->au_params[2] && 
+	 www->au_params[3] && www->au_params[4] && www->au_params[5] && 
+	 !www->au_params[6]);
+  TEST_1(s = sip_header_as_string(home, (sip_header_t *)www));
+  TEST_1(strlen(s) >= 128);
+
+  su_home_unref(home);
+  END();
+}
+
 int test_retry_after(void)
 {
   /* Test Session-Expires header */
@@ -3548,7 +3573,7 @@
   retval |= test_caller_prefs(); fflush(stdout);
   retval |= test_callerpref_scoring(); fflush(stdout);
   retval |= test_warning(); fflush(stdout);
-
+  retval |= test_www_authenticate(); fflush(stdout);
   retval |= test_sec_ext(); fflush(stdout);
 
   retval |= test_utils(); fflush(stdout);



More information about the Freeswitch-svn mailing list