[Top][All Lists]
[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, 18 Nov 2004 14:26:51 +0100 |
Update of /home/cvs/gsasl/lib/src
In directory dopio:/tmp/cvs-serv2777/lib/src
Modified Files:
Makefile.am init.c
Removed Files:
common.c
Log Message:
Collapse common.c into init.c.
--- /home/cvs/gsasl/lib/src/Makefile.am 2004/11/18 13:00:31 1.15
+++ /home/cvs/gsasl/lib/src/Makefile.am 2004/11/18 13:26:51 1.16
@@ -30,7 +30,7 @@
-export-symbols-regex '^(gsasl|GSASL).*'
libgsasl_la_LIBADD = @LTLIBINTL@ ../gl/libgl.la ../crypto/libgc.la
libgsasl_la_SOURCES = gsasl.h.in internal.h \
- init.c done.c register.c error.c version.c common.c \
+ init.c done.c register.c error.c version.c \
callback.c property.c \
supportp.c suggest.c listmech.c \
xstart.c xstep.c xfinish.c xcode.c \
--- /home/cvs/gsasl/lib/src/init.c 2004/10/03 22:36:10 1.9
+++ /home/cvs/gsasl/lib/src/init.c 2004/11/18 13:26:51 1.10
@@ -24,8 +24,83 @@
/* Get gc_init. */
#include <gc.h>
-/* See common.c. */
-extern Gsasl_mechanism *_gsasl_all_mechanisms[];
+/* Get mechanism headers. */
+#include "cram-md5/cram-md5.h"
+#include "external/external.h"
+#include "gssapi/x-gssapi.h"
+#include "anonymous/anonymous.h"
+#include "plain/plain.h"
+#include "securid/securid.h"
+#include "digest-md5/digest-md5.h"
+
+#include "login/login.h"
+#include "ntlm/x-ntlm.h"
+#include "kerberos_v5/kerberos_v5.h"
+
+const char *GSASL_VALID_MECHANISM_CHARACTERS =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_";
+
+static int
+register_builtin_mechs (Gsasl * ctx)
+{
+ int rc;
+
+#ifdef USE_ANONYMOUS
+ rc = gsasl_register (ctx, &gsasl_anonymous_mechanism);
+ if (rc != GSASL_OK)
+ return rc;
+#endif /* USE_ANONYMOUS */
+
+#ifdef USE_EXTERNAL
+ rc = gsasl_register (ctx, &gsasl_external_mechanism);
+ if (rc != GSASL_OK)
+ return rc;
+#endif /* USE_EXTERNAL */
+
+#ifdef USE_PLAIN
+ rc = gsasl_register (ctx, &gsasl_plain_mechanism);
+ if (rc != GSASL_OK)
+ return rc;
+#endif /* USE_PLAIN */
+
+#ifdef USE_LOGIN
+ rc = gsasl_register (ctx, &gsasl_login_mechanism);
+ if (rc != GSASL_OK)
+ return rc;
+#endif /* USE_LOGIN */
+
+#ifdef USE_SECURID
+ rc = gsasl_register (ctx, &gsasl_securid_mechanism);
+ if (rc != GSASL_OK)
+ return rc;
+#endif /* USE_SECURID */
+
+#ifdef USE_NTLM
+ rc = gsasl_register (ctx, &gsasl_ntlm_mechanism);
+ if (rc != GSASL_OK)
+ return rc;
+#endif /* USE_NTLM */
+
+#ifdef USE_CRAM_MD5
+ rc = gsasl_register (ctx, &gsasl_cram_md5_mechanism);
+ if (rc != GSASL_OK)
+ return rc;
+#endif /* USE_CRAM_MD5 */
+
+#ifdef USE_DIGEST_MD5
+ rc = gsasl_register (ctx, &gsasl_digest_md5_mechanism);
+ if (rc != GSASL_OK)
+ return rc;
+#endif /* USE_DIGEST_MD5 */
+
+#ifdef USE_GSSAPI
+ rc = gsasl_register (ctx, &gsasl_gssapi_mechanism);
+ if (rc != GSASL_OK)
+ return rc;
+#endif /* USE_GSSAPI */
+
+ return GSASL_OK;
+}
/**
* gsasl_init:
@@ -51,14 +126,11 @@
if (*ctx == NULL)
return GSASL_MALLOC_ERROR;
- for (i = 0; _gsasl_all_mechanisms[i]; i++)
+ rc = register_builtin_mechs (*ctx);
+ if (rc != GSASL_OK)
{
- rc = gsasl_register (*ctx, _gsasl_all_mechanisms[i]);
- if (rc != GSASL_OK)
- {
- gsasl_done (*ctx);
- return rc;
- }
+ gsasl_done (*ctx);
+ return rc;
}
return GSASL_OK;
- CVS gsasl/lib/src, gsasl-commit, 2004/11/07
- CVS gsasl/lib/src, gsasl-commit, 2004/11/18
- CVS gsasl/lib/src, gsasl-commit, 2004/11/18
- CVS gsasl/lib/src,
gsasl-commit <=
- CVS gsasl/lib/src, gsasl-commit, 2004/11/18
- CVS gsasl/lib/src, gsasl-commit, 2004/11/18
- CVS gsasl/lib/src, gsasl-commit, 2004/11/18
- CVS gsasl/lib/src, gsasl-commit, 2004/11/18
- CVS gsasl/lib/src, gsasl-commit, 2004/11/18
- CVS gsasl/lib/src, gsasl-commit, 2004/11/26
- CVS gsasl/lib/src, gsasl-commit, 2004/11/26
- CVS gsasl/lib/src, gsasl-commit, 2004/11/26
- CVS gsasl/lib/src, gsasl-commit, 2004/11/27
- CVS gsasl/lib/src, gsasl-commit, 2004/11/27