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: Thu, 23 Sep 2004 02:49:14 +0200

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

Modified Files:
        common.c error.c gsasl.h.in internal.h property.c 
Log Message:
Make SECURID client use new allocating API.
Use new callback/property API in SECURID client.


--- /home/cvs/gsasl/lib/src/common.c    2004/09/21 02:10:33     1.21
+++ /home/cvs/gsasl/lib/src/common.c    2004/09/23 00:49:14     1.22
@@ -158,11 +158,11 @@
     NULL,
     NULL,
     _gsasl_securid_client_start,
-    _gsasl_securid_client_step,
+    NULL,
     _gsasl_securid_client_finish,
     NULL,
     NULL,
-    NULL
+    _gsasl_securid_client_step
 #endif
     },
    {
--- /home/cvs/gsasl/lib/src/error.c     2004/09/21 01:52:49     1.8
+++ /home/cvs/gsasl/lib/src/error.c     2004/09/23 00:49:14     1.9
@@ -330,6 +330,16 @@
            "password was not provided.");
       break;
 
+    case GSASL_NO_PASSCODE:
+      p = _("Authentication failed because the "
+           "passcode was not provided.");
+      break;
+
+    case GSASL_NO_PIN:
+      p = _("Authentication failed because the "
+           "pin code was not provided.");
+      break;
+
     case GSASL_NO_SERVICE:
       p = _("Authentication failed because the "
            "service name was not provided.");
--- /home/cvs/gsasl/lib/src/gsasl.h.in  2004/09/23 00:20:57     1.23
+++ /home/cvs/gsasl/lib/src/gsasl.h.in  2004/09/23 00:49:14     1.24
@@ -105,9 +105,11 @@
       GSASL_NO_AUTHID = 53,
       GSASL_NO_AUTHZID = 54,
       GSASL_NO_PASSWORD = 55,
-      GSASL_NO_SERVICE = 56,
-      GSASL_NO_HOSTNAME = 57,
-      GSASL_CANNOT_VALIDATE = 58
+      GSASL_NO_PASSCODE = 56,
+      GSASL_NO_PIN = 57,
+      GSASL_NO_SERVICE = 58,
+      GSASL_NO_HOSTNAME = 59,
+      GSASL_CANNOT_VALIDATE = 60
     } Gsasl_rc;
 
 /* Quality of Protection types, used by DIGEST-MD5 */
@@ -139,6 +141,9 @@
     GSASL_AUTHID,
     GSASL_AUTHZID,
     GSASL_PASSWORD,
+    GSASL_PASSCODE,
+    GSASL_SUGGESTED_PIN,
+    GSASL_PIN,
     GSASL_CLIENT_ANONYMOUS,
     GSASL_CLIENT_PASSCODE,
     GSASL_CLIENT_PIN,
--- /home/cvs/gsasl/lib/src/internal.h  2004/09/23 00:20:57     1.13
+++ /home/cvs/gsasl/lib/src/internal.h  2004/09/23 00:49:14     1.14
@@ -96,6 +96,9 @@
   char *authid;
   char *authzid;
   char *password;
+  char *passcode;
+  char *pin;
+  char *suggestedpin;
   /* Obsolete callbacks. */
   Gsasl_client_callback_authorization_id cbc_authorization_id;
   Gsasl_client_callback_authentication_id cbc_authentication_id;
@@ -139,6 +142,9 @@
   char *authid;
   char *authzid;
   char *password;
+  char *passcode;
+  char *pin;
+  char *suggestedpin;
 };
 
 #endif /* INTERNAL_H */
--- /home/cvs/gsasl/lib/src/property.c  2004/09/21 00:36:22     1.7
+++ /home/cvs/gsasl/lib/src/property.c  2004/09/23 00:49:14     1.8
@@ -45,6 +45,18 @@
       p = &sctx->password;
       break;
 
+    case GSASL_PASSCODE:
+      p = &sctx->passcode;
+      break;
+
+    case GSASL_PIN:
+      p = &sctx->pin;
+      break;
+
+    case GSASL_SUGGESTED_PIN:
+      p = &sctx->suggestedpin;
+      break;
+
     default:
       break;
     }
@@ -76,6 +88,18 @@
       p = &ctx->password;
       break;
 
+    case GSASL_PASSCODE:
+      p = &ctx->passcode;
+      break;
+
+    case GSASL_PIN:
+      p = &ctx->pin;
+      break;
+
+    case GSASL_SUGGESTED_PIN:
+      p = &ctx->suggestedpin;
+      break;
+
     default:
       break;
     }
@@ -246,6 +270,8 @@
       Gsasl_client_callback_authorization_id cb_authorization_id;
       Gsasl_client_callback_authentication_id cb_authentication_id;
       Gsasl_client_callback_password cb_password;
+      Gsasl_client_callback_passcode cb_passcode;
+      Gsasl_client_callback_pin cb_pin;
       char buf[BUFSIZ];
       size_t buflen = BUFSIZ - 1;
       int res;
@@ -301,6 +327,28 @@
          gsasl_property_set (sctx, prop, buf);
          break;
 
+       case GSASL_PASSCODE:
+         cb_passcode = gsasl_client_callback_passcode_get (sctx->ctx);
+         if (!cb_passcode)
+           break;
+         res = cb_passcode (sctx, buf, &buflen);
+         if (res != GSASL_OK)
+           break;
+         buf[buflen] = '\0';
+         gsasl_property_set (sctx, prop, buf);
+         break;
+
+       case GSASL_PIN:
+         cb_pin = gsasl_client_callback_pin_get (sctx->ctx);
+         if (!cb_pin)
+           break;
+         res = cb_pin (sctx, sctx->suggestedpin, buf, &buflen);
+         if (res != GSASL_OK)
+           break;
+         buf[buflen] = '\0';
+         gsasl_property_set (sctx, prop, buf);
+         break;
+
        default:
          break;
        }





reply via email to

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