shishi-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS shishi/tests


From: shishi-commit
Subject: CVS shishi/tests
Date: Fri, 17 Sep 2004 14:43:36 +0200

Update of /home/cvs/shishi/tests
In directory dopio:/tmp/cvs-serv21808

Modified Files:
        authenticator.c 
Log Message:
Use new API.


--- /home/cvs/shishi/tests/authenticator.c      2004/09/10 09:42:49     1.18
+++ /home/cvs/shishi/tests/authenticator.c      2004/09/17 12:43:35     1.19
@@ -120,16 +120,18 @@
   else
     fail ("shishi_authenticator_client_set() failed\n");
 
-  /* shishi_authenticator_cname_get */
-  n = sizeof (buffer);
-  res = shishi_authenticator_cname_get (handle, a, buffer, &n);
+  /* shishi_authenticator_client */
+  res = shishi_authenticator_client (handle, a, &buf, &n);
   if (debug)
-    escapeprint (buffer, n);
+    escapeprint (buf, n);
   if (res == SHISHI_OK &&
-      n == strlen ("foo/bar/baz") && memcmp (buffer, "foo/bar/baz", n) == 0)
-    success ("shishi_authenticator_cname_get() OK\n");
+      n == strlen ("foo/bar/baz") && memcmp (buf, "foo/bar/baz", n) == 0)
+    {
+      success ("shishi_authenticator_client() OK\n");
+      free (buf);
+    }
   else
-    fail ("shishi_authenticator_cname_get() failed\n");
+    fail ("shishi_authenticator_client() failed\n");
 
   /* shishi_authenticator_client_set */
   res = shishi_authenticator_client_set (handle, a, "foo");
@@ -138,16 +140,15 @@
   else
     fail ("shishi_authenticator_client_set() failed\n");
 
-  /* shishi_authenticator_cname_get */
-  n = sizeof (buffer);
-  res = shishi_authenticator_cname_get (handle, a, buffer, &n);
+  /* shishi_authenticator_client */
+  res = shishi_authenticator_client (handle, a, &buf, &n);
   if (debug)
-    escapeprint (buffer, n);
+    escapeprint (buf, n);
   if (res == SHISHI_OK && n == strlen ("foo")
-      && memcmp (buffer, "foo", n) == 0)
-    success ("shishi_authenticator_cname_get() OK\n");
+      && memcmp (buf, "foo", n) == 0)
+    success ("shishi_authenticator_client() OK\n");
   else
-    fail ("shishi_authenticator_cname_get() failed\n");
+    fail ("shishi_authenticator_client() failed\n");
 
   /* shishi_authenticator_set_crealm */
   res = shishi_authenticator_set_crealm (handle, a, "bar");
@@ -156,16 +157,18 @@
   else
     fail ("shishi_authenticator_set_crealm() failed\n");
 
-  /* shishi_authenticator_cnamerealm_get */
-  n = sizeof (buffer);
-  res = shishi_authenticator_cnamerealm_get (handle, a, buffer, &n);
+  /* shishi_authenticator_clientrealm */
+  res = shishi_authenticator_clientrealm (handle, a, &buf, &n);
   if (debug)
-    escapeprint (buffer, n);
+    escapeprint (buf, n);
   if (res == SHISHI_OK &&
-      n == strlen ("address@hidden") && memcmp (buffer, "address@hidden", n) 
== 0)
-    success ("shishi_authenticator_cnamerealm_get() OK\n");
+      n == strlen ("address@hidden") && memcmp (buf, "address@hidden", n) == 0)
+    {
+      success ("shishi_authenticator_clientrealm() OK\n");
+      free (buf);
+    }
   else
-    fail ("shishi_authenticator_cnamerealm_get() failed\n");
+    fail ("shishi_authenticator_clientrealm() failed\n");
 
   /* shishi_authenticator_add_authorizationdata */
   res = shishi_authenticator_add_authorizationdata (handle, a, 42, "baz", 3);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]