shishi-commit
[Top][All Lists]
Advanced

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

CVS shishi/lib


From: shishi-commit
Subject: CVS shishi/lib
Date: Fri, 17 Sep 2004 15:21:56 +0200

Update of /home/cvs/shishi/lib
In directory dopio:/tmp/cvs-serv22320

Modified Files:
        shishi.h.in principal.c 
Log Message:
(shishi_principal_name_get): Remove.


--- /home/cvs/shishi/lib/shishi.h.in    2004/09/17 13:20:33     1.249
+++ /home/cvs/shishi/lib/shishi.h.in    2004/09/17 13:21:56     1.250
@@ -646,9 +646,6 @@
                                        Shishi_asn1 realmnode,
                                        const char *realmfield,
                                        char **out, size_t * outlen);
-extern int shishi_principal_name_get (Shishi * handle, Shishi_asn1 namenode,
-                                     const char *namefield, char *out,
-                                     size_t * outlen);
 extern int shishi_principal_name_set (Shishi * handle,
                                      Shishi_asn1 namenode,
                                      const char *namefield,
--- /home/cvs/shishi/lib/principal.c    2004/09/17 13:20:33     1.36
+++ /home/cvs/shishi/lib/principal.c    2004/09/17 13:21:56     1.37
@@ -270,65 +270,6 @@
   return SHISHI_OK;
 }
 
-int
-shishi_principal_name_get (Shishi * handle,
-                          Shishi_asn1 namenode,
-                          const char *namefield, char *out, size_t * outlen)
-{
-  int res;
-  char *format;
-  size_t totlen = 0;
-  size_t i, j, n, len;
-
-  /* FIXME: allocate output instead of writing inline */
-
-  asprintf (&format, "%s.name-string", namefield);
-  res = shishi_asn1_number_of_elements (handle, namenode, format, &n);
-  free (format);
-  if (res != SHISHI_OK)
-    return res;
-
-  totlen = 0;
-  for (i = 1; i <= n; i++)
-    {
-      len = *outlen - totlen;
-      asprintf (&format, "%s.name-string.?%d", namefield, i);
-      res =
-       shishi_asn1_read_inline (handle, namenode, format, &out[totlen],
-                                &len);
-      free (format);
-      if (res != SHISHI_OK)
-       return res;
-
-      for (j = 0; j < len; j++)
-       {
-         if (out[totlen] == '@' || out[totlen] == '/' || out[totlen] == '\\')
-           {
-             if (totlen + strlen ("\\") > *outlen)
-               return SHISHI_TOO_SMALL_BUFFER;
-             out[totlen + 1] = out[totlen];
-             out[totlen] = '\\';
-             len++;
-             totlen++;
-             j++;
-           }
-         totlen++;
-       }
-
-      if (i < n)
-       {
-         if (totlen + strlen ("/") > *outlen)
-           return SHISHI_TOO_SMALL_BUFFER;
-         out[totlen] = '/';
-         totlen++;
-       }
-    }
-
-  *outlen = totlen;
-
-  return SHISHI_OK;
-}
-
 /**
  * shishi_principal_name_realm:
  * @handle: Shishi library handle create by shishi_init().





reply via email to

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