gsasl-commit
[Top][All Lists]
Advanced

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

CVS gsasl/lib/src


From: gsasl-commit
Subject: CVS gsasl/lib/src
Date: Sat, 18 Sep 2004 03:59:58 +0200

Update of /home/cvs/gsasl/lib/src
In directory dopio:/tmp/cvs-serv27610/lib/src

Modified Files:
        common.c error.c gsasl.h.in internal.h property.c 
Log Message:
Make PLAIN client use new callback API.
Add authid property.


--- /home/cvs/gsasl/lib/src/common.c    2004/09/18 01:37:22     1.7
+++ /home/cvs/gsasl/lib/src/common.c    2004/09/18 01:59:58     1.8
@@ -98,10 +98,11 @@
     NULL,
     NULL,
     _gsasl_plain_client_start,
-    _gsasl_plain_client_step,
+    NULL,
     _gsasl_plain_client_finish,
     NULL,
-    NULL
+    NULL,
+    _gsasl_plain_client_step
 #endif
     },
    {
--- /home/cvs/gsasl/lib/src/error.c     2004/09/18 01:37:22     1.4
+++ /home/cvs/gsasl/lib/src/error.c     2004/09/18 01:59:58     1.5
@@ -315,6 +315,11 @@
            "anonymous token was not provided.");
       break;
 
+    case GSASL_NO_AUTHID:
+      p = _("Authentication failed because the "
+           "authentication identity was not provided.");
+      break;
+
     case GSASL_NO_AUTHZID:
       p = _("Authentication failed because the "
            "authorization identity was not provided.");
--- /home/cvs/gsasl/lib/src/gsasl.h.in  2004/09/18 01:37:22     1.10
+++ /home/cvs/gsasl/lib/src/gsasl.h.in  2004/09/18 01:59:58     1.11
@@ -86,6 +86,7 @@
     GSASL_NO_SERVER_CODE,
     GSASL_NO_CALLBACK,
     GSASL_NO_ANONYMOUS_TOKEN,
+    GSASL_NO_AUTHID,
     GSASL_NO_AUTHZID,
     GSASL_NO_PASSWORD,
     /* Mechanism specific errors. */
--- /home/cvs/gsasl/lib/src/internal.h  2004/09/18 01:37:22     1.6
+++ /home/cvs/gsasl/lib/src/internal.h  2004/09/18 01:59:58     1.7
@@ -95,6 +95,7 @@
   Gsasl_callback cb;
   /* Global properties. */
   char *anonymous_token;
+  char *authid;
   char *authzid;
   char *password;
   /* Obsolete callbacks. */
@@ -137,6 +138,7 @@
   /* Session specific properties.  If NULL, use corresponding global
    * property. */
   char *anonymous_token;
+  char *authid;
   char *authzid;
   char *password;
 };
--- /home/cvs/gsasl/lib/src/property.c  2004/09/18 01:37:22     1.2
+++ /home/cvs/gsasl/lib/src/property.c  2004/09/18 01:59:58     1.3
@@ -33,6 +33,10 @@
       p = &sctx->anonymous_token;
       break;
 
+    case GSASL_CLIENT_AUTHID:
+      p = &sctx->authid;
+      break;
+
     case GSASL_CLIENT_AUTHZID:
       p = &sctx->authzid;
       break;
@@ -60,6 +64,10 @@
       p = &ctx->anonymous_token;
       break;
 
+    case GSASL_CLIENT_AUTHID:
+      p = &ctx->authid;
+      break;
+
     case GSASL_CLIENT_AUTHZID:
       p = &ctx->authzid;
       break;
@@ -231,6 +239,7 @@
     {
       Gsasl_client_callback_anonymous cb_anonymous;
       Gsasl_client_callback_authorization_id cb_authorization_id;
+      Gsasl_client_callback_authentication_id cb_authentication_id;
       Gsasl_client_callback_password cb_password;
       char buf[BUFSIZ];
       size_t buflen = BUFSIZ - 1;
@@ -252,6 +261,18 @@
          gsasl_property_set (sctx, prop, buf);
          break;
 
+       case GSASL_CLIENT_AUTHID:
+         cb_authentication_id =
+           gsasl_client_callback_authentication_id_get (sctx->ctx);
+         if (!cb_authentication_id)
+           break;
+         res = cb_authentication_id (sctx, buf, &buflen);
+         if (res != GSASL_OK)
+           break;
+         buf[buflen] = '\0';
+         gsasl_property_set (sctx, prop, buf);
+         break;
+
        case GSASL_CLIENT_AUTHZID:
          cb_authorization_id =
            gsasl_client_callback_authorization_id_get (sctx->ctx);





reply via email to

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