Module Name:    src
Committed By:   christos
Date:           Sat Feb 12 23:21:33 UTC 2011

Modified Files:
        src/crypto/external/bsd/libsaslc/dist/man: libsaslc.3
        src/crypto/external/bsd/libsaslc/dist/src: buffer.c crypto.c dict.c
            dict.h error.c list.c mech.c mech.h mech_crammd5.c mech_digestmd5.c
            mech_gssapi.c mech_plain.c msg.c parser.c saslc.c saslc_private.h
            xsess.c
        src/crypto/external/bsd/libsaslc/dist/test: Atffile Makefile
            example_client.c t_crypto.c t_dict.c t_error.c t_parser.c t_saslc.c
            t_session.c

Log Message:
Fix botched merges of the patch that Anon Ymous sent. From Anon Ymous


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3
cvs rdiff -u -r1.1 -r1.2 src/crypto/external/bsd/libsaslc/dist/src/buffer.c \
    src/crypto/external/bsd/libsaslc/dist/src/list.c \
    src/crypto/external/bsd/libsaslc/dist/src/msg.c
cvs rdiff -u -r1.4 -r1.5 src/crypto/external/bsd/libsaslc/dist/src/crypto.c \
    src/crypto/external/bsd/libsaslc/dist/src/dict.c \
    src/crypto/external/bsd/libsaslc/dist/src/mech_gssapi.c \
    src/crypto/external/bsd/libsaslc/dist/src/xsess.c
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/libsaslc/dist/src/dict.h \
    src/crypto/external/bsd/libsaslc/dist/src/error.c \
    src/crypto/external/bsd/libsaslc/dist/src/mech.c \
    src/crypto/external/bsd/libsaslc/dist/src/mech.h \
    src/crypto/external/bsd/libsaslc/dist/src/mech_crammd5.c \
    src/crypto/external/bsd/libsaslc/dist/src/mech_plain.c \
    src/crypto/external/bsd/libsaslc/dist/src/parser.c \
    src/crypto/external/bsd/libsaslc/dist/src/saslc.c \
    src/crypto/external/bsd/libsaslc/dist/src/saslc_private.h
cvs rdiff -u -r1.6 -r1.7 \
    src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c
cvs rdiff -u -r1.2 -r1.3 src/crypto/external/bsd/libsaslc/dist/test/Atffile
cvs rdiff -u -r1.3 -r1.4 src/crypto/external/bsd/libsaslc/dist/test/Makefile \
    src/crypto/external/bsd/libsaslc/dist/test/example_client.c \
    src/crypto/external/bsd/libsaslc/dist/test/t_crypto.c \
    src/crypto/external/bsd/libsaslc/dist/test/t_dict.c \
    src/crypto/external/bsd/libsaslc/dist/test/t_error.c \
    src/crypto/external/bsd/libsaslc/dist/test/t_parser.c \
    src/crypto/external/bsd/libsaslc/dist/test/t_saslc.c \
    src/crypto/external/bsd/libsaslc/dist/test/t_session.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3
diff -u src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.6 src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.7
--- src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3:1.6	Sat Feb 12 11:08:18 2011
+++ src/crypto/external/bsd/libsaslc/dist/man/libsaslc.3	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-.\"	$NetBSD: libsaslc.3,v 1.6 2011/02/12 16:08:18 wiz Exp $
+.\"	$NetBSD: libsaslc.3,v 1.7 2011/02/12 23:21:32 christos Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -142,6 +142,7 @@
 .Sx CONFIGURATION
 below for the supported mechanisms.
 The valid security options are
+.Pp
 .Bl -tag -width "nodictionaryxxx" -offset indent -compact
 .It Qo noanonymous Qc
 reject anonymous mechanisms
@@ -154,6 +155,7 @@
 .It Qo mutual Qc
 require mutual authentication mechanisms
 .El
+.Pp
 Unknown security options are ignored.
 Returns a session handle or
 .Dv NULL
@@ -488,7 +490,8 @@
 By default all supported ciphers are used, but they may be limited by
 a comma delimited list of cipher names.
 The recognized cipher names for DIGEST-MD5 are:
-.Bl -tag -offset indent
+.Pp
+.Bl -tag -offset indent -compact
 .It Li "3des"
 Triple-DES Cipher in CBC "two keys" mode with 112 bit key
 .It Li "aes"
@@ -539,7 +542,8 @@
 By default all supported QOP values are allowed, but they may be
 limited by a comma delimited list of QOP values.
 The recognized QOP values are:
-.Bl -tag -offset indent
+.Pp
+.Bl -tag -offset indent -compact
 .It Li "auth"
 authentication only
 .It Li "auth-int"

Index: src/crypto/external/bsd/libsaslc/dist/src/buffer.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/buffer.c:1.1 src/crypto/external/bsd/libsaslc/dist/src/buffer.c:1.2
--- src/crypto/external/bsd/libsaslc/dist/src/buffer.c:1.1	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/buffer.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: buffer.c,v 1.1 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: buffer.c,v 1.2 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,13 +32,14 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: buffer.c,v 1.1 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: buffer.c,v 1.2 2011/02/12 23:21:32 christos Exp $");
 
 #include <sys/param.h>		/* for MIN() */
+
 #include <assert.h>
-#include <stdlib.h>
 #include <saslc.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include "buffer.h"
Index: src/crypto/external/bsd/libsaslc/dist/src/list.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/list.c:1.1 src/crypto/external/bsd/libsaslc/dist/src/list.c:1.2
--- src/crypto/external/bsd/libsaslc/dist/src/list.c:1.1	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/list.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: list.c,v 1.1 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: list.c,v 1.2 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,10 +32,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: list.c,v 1.1 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: list.c,v 1.2 2011/02/12 23:21:32 christos Exp $");
 
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include "list.h"
@@ -154,11 +154,10 @@
 {
 	list_t *n;
 
-	while (l != NULL) {
+	for (/*EMPTY*/; l != NULL; l = n) {
 		n = l->next;
 		free(l->value);
 		free(l);
-		l = n;
 	}
 }
 
Index: src/crypto/external/bsd/libsaslc/dist/src/msg.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/msg.c:1.1 src/crypto/external/bsd/libsaslc/dist/src/msg.c:1.2
--- src/crypto/external/bsd/libsaslc/dist/src/msg.c:1.1	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/msg.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: msg.c,v 1.1 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: msg.c,v 1.2 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,16 +32,15 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: msg.c,v 1.1 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: msg.c,v 1.2 2011/02/12 23:21:32 christos Exp $");
 
-#include <stdlib.h>
 #include <stdarg.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <syslog.h>
 
 #include "msg.h"
 
-
 /**
  * XXX: global debug flag.  This is unique as it is set as early as
  * possible by checking the environment (looking for SASLC_ENV_DEBUG)

Index: src/crypto/external/bsd/libsaslc/dist/src/crypto.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/crypto.c:1.4 src/crypto/external/bsd/libsaslc/dist/src/crypto.c:1.5
--- src/crypto/external/bsd/libsaslc/dist/src/crypto.c:1.4	Sat Feb 12 17:46:14 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/crypto.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: crypto.c,v 1.4 2011/02/12 22:46:14 christos Exp $ */
+/* $NetBSD: crypto.c,v 1.5 2011/02/12 23:21:32 christos Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -36,18 +36,19 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: crypto.c,v 1.4 2011/02/12 22:46:14 christos Exp $");
+__RCSID("$NetBSD: crypto.c,v 1.5 2011/02/12 23:21:32 christos Exp $");
 
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include <openssl/bio.h>
 #include <openssl/buffer.h>
 #include <openssl/evp.h>
+#include <openssl/hmac.h>
 #include <openssl/md5.h>
 #include <openssl/rand.h>
-#include <openssl/hmac.h>
 
 #include "crypto.h"
 
Index: src/crypto/external/bsd/libsaslc/dist/src/dict.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/dict.c:1.4 src/crypto/external/bsd/libsaslc/dist/src/dict.c:1.5
--- src/crypto/external/bsd/libsaslc/dist/src/dict.c:1.4	Sat Feb 12 09:24:18 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/dict.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dict.c,v 1.4 2011/02/12 14:24:18 christos Exp $ */
+/* $NetBSD: dict.c,v 1.5 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,9 +35,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: dict.c,v 1.4 2011/02/12 14:24:18 christos Exp $");
+__RCSID("$NetBSD: dict.c,v 1.5 2011/02/12 23:21:32 christos Exp $");
 
 #include <sys/queue.h>
+
 #include <ctype.h>
 #include <errno.h>
 #include <stdbool.h>
@@ -47,7 +48,6 @@
 #include "dict.h"
 #include "msg.h"
 
-
 /** dictionary */
 LIST_HEAD(saslc__dict_t, saslc__dict_node_t);
 
@@ -60,9 +60,9 @@
 } saslc__dict_node_t;
 
 /*
- * XXX: If you add property keys, readjust these values so that
- * saslc__dict_hashval() remains collisionless.  test_hash.c can help
- * with this.
+ * XXX: If you add property keys, please readjust these values so that
+ * saslc__dict_hashval() remains collisionless.
+ * dist/test_hash/test_hash.c can help with this.
  */
 /* no collisions: hsize=15  hinit=3  shift=7 */
 #define HASH_SIZE	15
@@ -105,7 +105,7 @@
 
 /**
  * @brief checks if the key is legal.
- * @param key node key
+ * @param key node key - must not be NULL
  * @return true if key is legal, false otherwise
  *
  * Note: A legal key begins with an isalpha(3) character and is
@@ -114,7 +114,8 @@
 static bool
 saslc__dict_valid_key(const char *key)
 {
-        /* key is empty string */
+
+        /* key is not NULL */
 	if (!isalpha((unsigned char)*key))
 		return false;
 
Index: src/crypto/external/bsd/libsaslc/dist/src/mech_gssapi.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/mech_gssapi.c:1.4 src/crypto/external/bsd/libsaslc/dist/src/mech_gssapi.c:1.5
--- src/crypto/external/bsd/libsaslc/dist/src/mech_gssapi.c:1.4	Sat Feb 12 17:46:14 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/mech_gssapi.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mech_gssapi.c,v 1.4 2011/02/12 22:46:14 christos Exp $ */
+/* $NetBSD: mech_gssapi.c,v 1.5 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mech_gssapi.c,v 1.4 2011/02/12 22:46:14 christos Exp $");
+__RCSID("$NetBSD: mech_gssapi.c,v 1.5 2011/02/12 23:21:32 christos Exp $");
 
 #include <assert.h>
 #include <errno.h>
@@ -44,6 +44,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include <gssapi/gssapi.h>
 
 #include "buffer.h"
@@ -129,10 +130,9 @@
 		gss_release_name(&min_s, &ms->server_name);
 	if (ms->client_name != GSS_C_NO_NAME)
 		gss_release_name(&min_s, &ms->client_name);
-	if (ms->enc_ctx)
-		saslc__buffer_destroy(ms->enc_ctx);
-	if (ms->dec_ctx)
-		saslc__buffer32_destroy(ms->dec_ctx);
+
+	saslc__buffer_destroy(ms->enc_ctx);
+	saslc__buffer32_destroy(ms->dec_ctx);
 	free(ms);
 	sess->mech_sess = NULL;
 
@@ -434,7 +434,7 @@
 	saslc__msg_dbg("%s: buf='%s'", __func__, buf);
 
 	maj_s = gss_import_name(&min_s, &bufdesc, GSS_C_NT_HOSTBASED_SERVICE,
-	                        service);
+	    service);
 	free(buf);
 	if (GSS_ERROR(maj_s)) {
 		saslc__mech_gssapi_set_err(sess, ERROR_MECH, maj_s, min_s);
@@ -870,9 +870,11 @@
 		    "already authenticated");
 		return MECH_ERROR;
 
+#if 0	/* no default so the compiler can tell us if we miss an enum */
 	default:
 		assert(/*CONSTCOND*/0); /* impossible */
 		/*NOTREACHED*/
+#endif
 	}
 	/*LINTED*/
 	assert(/*CONSTCOND*/0);		/* XXX: impossible */
Index: src/crypto/external/bsd/libsaslc/dist/src/xsess.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/xsess.c:1.4 src/crypto/external/bsd/libsaslc/dist/src/xsess.c:1.5
--- src/crypto/external/bsd/libsaslc/dist/src/xsess.c:1.4	Sat Feb 12 17:46:14 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/xsess.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: xsess.c,v 1.4 2011/02/12 22:46:14 christos Exp $ */
+/* $NetBSD: xsess.c,v 1.5 2011/02/12 23:21:32 christos Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: xsess.c,v 1.4 2011/02/12 22:46:14 christos Exp $");
+__RCSID("$NetBSD: xsess.c,v 1.5 2011/02/12 23:21:32 christos Exp $");
 
 #include <assert.h>
 #include <saslc.h>
@@ -52,7 +52,6 @@
 #include "parser.h"
 #include "saslc_private.h"
 
-
 /*
  * TODO:
  *
@@ -160,14 +159,12 @@
  * the sasl session.
  * @param ctx sasl context
  * @param mechs comma or space separated list of mechanisms
- * e.g., "PLAIN,LOGIN" or "PLAIN LOGIN". Note that
- * this function is not case sensitive
+ * e.g., "PLAIN,LOGIN" or "PLAIN LOGIN".
  * @param sec_opts comma or space separated list of security options
- * @return pointer to the mech on success, NULL if none found.
+ * @return pointer to the mech on success, NULL if none mechanism is chosen
  *
  * Note: this uses SASLC_PROP_SECURITY from the context dictionary.
- * Note: this function is not case sensitive regarding sec_opts.
- * @return pointer to the mech on success, NULL if none mechanism is chosen
+ * Note: this function is not case sensitive with regard to mechs or sec_opts.
  */
 static const saslc__mech_t *
 saslc__sess_choose_mech(saslc_t *ctx, const char *mechs, const char *sec_opts)
@@ -240,7 +237,7 @@
 	    == NULL) {
 		saslc__error_set(ERR(ctx), ERROR_MECH,
 		    "mechanism is not supported");
-                goto error;
+		goto error;
 	}
 
 	/* XXX: special early check of mechanism dictionary for debug flag */
@@ -258,7 +255,7 @@
 	/* properties */
 	if ((sess->prop = saslc__dict_create()) == NULL) {
 		saslc__error_set(ERR(ctx), ERROR_NOMEM, NULL);
-                goto error;
+		goto error;
 	}
 
 	sess->context = ctx;
@@ -269,9 +266,8 @@
 	return sess;
 
 error:
-        free(sess);
-
-        return NULL;
+	free(sess);
+	return NULL;
 }
 
 /**

Index: src/crypto/external/bsd/libsaslc/dist/src/dict.h
diff -u src/crypto/external/bsd/libsaslc/dist/src/dict.h:1.3 src/crypto/external/bsd/libsaslc/dist/src/dict.h:1.4
--- src/crypto/external/bsd/libsaslc/dist/src/dict.h:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/dict.h	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: dict.h,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: dict.h,v 1.4 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -39,8 +39,8 @@
 #ifndef _DICT_H_
 #define _DICT_H_
 
-#include <stdlib.h>
 #include <stdbool.h>
+#include <stdlib.h>
 
 typedef enum {
 	DICT_OK = 0,
Index: src/crypto/external/bsd/libsaslc/dist/src/error.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/error.c:1.3 src/crypto/external/bsd/libsaslc/dist/src/error.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/src/error.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/error.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: error.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: error.c,v 1.4 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,13 +35,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: error.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: error.c,v 1.4 2011/02/12 23:21:32 christos Exp $");
 
 #include <stdio.h>
 
 #include "error.h"
 
-
 /**
  * @brief returns error string
  * @param err error
Index: src/crypto/external/bsd/libsaslc/dist/src/mech.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/mech.c:1.3 src/crypto/external/bsd/libsaslc/dist/src/mech.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/src/mech.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/mech.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mech.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: mech.c,v 1.4 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,9 +35,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mech.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: mech.c,v 1.4 2011/02/12 23:21:32 christos Exp $");
 
 #include <sys/queue.h>
+
 #include <saslc.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -49,7 +50,6 @@
 #include "msg.h"
 #include "saslc_private.h"
 
-
 /* mechanisms */
 extern const saslc__mech_t saslc__mech_anonymous;
 extern const saslc__mech_t saslc__mech_crammd5;
@@ -134,8 +134,7 @@
 	LIST_FOREACH(node, list, nodes) {
 		if (strcasecmp(node->mech->name, mech_name) == 0)
 			return node;
-        }
-
+	}
 	return NULL;
 }
 
@@ -218,8 +217,8 @@
 int
 saslc__mech_generic_destroy(saslc_sess_t *sess)
 {
+
 	free(sess->mech_sess);
 	sess->mech_sess = NULL;
-
 	return 0;
 }
Index: src/crypto/external/bsd/libsaslc/dist/src/mech.h
diff -u src/crypto/external/bsd/libsaslc/dist/src/mech.h:1.3 src/crypto/external/bsd/libsaslc/dist/src/mech.h:1.4
--- src/crypto/external/bsd/libsaslc/dist/src/mech.h:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/mech.h	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mech.h,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: mech.h,v 1.4 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -38,9 +38,10 @@
 #ifndef _MECH_H_
 #define _MECH_H_
 
+#include <sys/queue.h>
+
 #include <assert.h>
 #include <stdint.h>
-#include <sys/queue.h>
 
 #include "dict.h"
 #include "list.h"
@@ -129,7 +130,7 @@
 typedef struct saslc__mech_list_node_t {
 	LIST_ENTRY(saslc__mech_list_node_t) nodes;	/**< nodes */
 	const saslc__mech_t *mech;			/**< mechanism */
-        saslc__dict_t *prop;				/**< mechanism config */
+	saslc__dict_t *prop;				/**< mechanism config */
 } saslc__mech_list_node_t;
 
 /* mechanisms list head */
@@ -145,10 +146,6 @@
 /* generic functions */
 int saslc__mech_generic_create(saslc_sess_t *);
 int saslc__mech_generic_destroy(saslc_sess_t *);
-int saslc__mech_generic_encode(saslc_sess_t *, const void *, size_t, void **,
-    size_t *);
-int saslc__mech_generic_decode(saslc_sess_t *, const void *, size_t, void **,
-    size_t *);
 
 /* additional functions */
 int saslc__mech_strdup(saslc_sess_t *, char **, size_t *, const char *,
Index: src/crypto/external/bsd/libsaslc/dist/src/mech_crammd5.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/mech_crammd5.c:1.3 src/crypto/external/bsd/libsaslc/dist/src/mech_crammd5.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/src/mech_crammd5.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/mech_crammd5.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mech_crammd5.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: mech_crammd5.c,v 1.4 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,13 +35,14 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mech_crammd5.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: mech_crammd5.c,v 1.4 2011/02/12 23:21:32 christos Exp $");
+
+#include <sys/param.h>
 
 #include <saslc.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/param.h>
 
 #include "crypto.h"
 #include "mech.h"
Index: src/crypto/external/bsd/libsaslc/dist/src/mech_plain.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/mech_plain.c:1.3 src/crypto/external/bsd/libsaslc/dist/src/mech_plain.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/src/mech_plain.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/mech_plain.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mech_plain.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: mech_plain.c,v 1.4 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mech_plain.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: mech_plain.c,v 1.4 2011/02/12 23:21:32 christos Exp $");
 
 #include <saslc.h>
 #include <stdio.h>
@@ -113,7 +113,7 @@
 	if (len == -1) {
 		saslc__error_set_errno(ERR(sess), ERROR_NOMEM);
 		return MECH_ERROR;
-        }
+	}
 	*out = outstr;
 	*outlen = len;
 
Index: src/crypto/external/bsd/libsaslc/dist/src/parser.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/parser.c:1.3 src/crypto/external/bsd/libsaslc/dist/src/parser.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/src/parser.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/parser.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: parser.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: parser.c,v 1.4 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,10 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: parser.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: parser.c,v 1.4 2011/02/12 23:21:32 christos Exp $");
+
+#include <sys/stat.h>
+#include <sys/syslimits.h>	/* for PATH_MAX */
 
 #include <ctype.h>
 #include <err.h>
@@ -44,8 +47,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/syslimits.h>	/* for PATH_MAX */
-#include <sys/stat.h>
 
 #include "dict.h"
 #include "msg.h"
Index: src/crypto/external/bsd/libsaslc/dist/src/saslc.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/saslc.c:1.3 src/crypto/external/bsd/libsaslc/dist/src/saslc.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/src/saslc.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/saslc.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: saslc.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: saslc.c,v 1.4 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,15 +35,15 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: saslc.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: saslc.c,v 1.4 2011/02/12 23:21:32 christos Exp $");
 
+#include <assert.h>
 #include <ctype.h>
 #include <saslc.h>
 #include <stdbool.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
-#include <stdbool.h>
-#include <assert.h>
 
 #include "crypto.h"  /* XXX: for saslc_{de,en}code64() */
 #include "dict.h"
@@ -53,7 +53,6 @@
 #include "parser.h"
 #include "saslc_private.h"
 
-
 /**
  * @brief check for a valid application name (no path separator)
  * @param appname application name
@@ -62,13 +61,13 @@
 static bool
 saslc__valid_appname(const char *appname)
 {
-        const char *p;
+	const char *p;
 
-        for (p = appname; *p; p++)
+	for (p = appname; *p; p++)
 		if (*p == '/')
-                        return false;
+			return false;
 
-        return true;
+	return true;
 }
 
 /**
@@ -97,14 +96,10 @@
 int
 saslc_init(saslc_t *ctx, const char *appname, const char *pathname)
 {
-	memset(ctx, 0, sizeof(*ctx));
 
-	ctx->refcnt = 0;	/* context reference counter */
+	/* ctx is already zeroed by saslc_alloc(). */
 	ctx->prop = saslc__dict_create();
 
-	ctx->appname = NULL;
-	ctx->pathname = NULL;
-
 	if (appname != NULL) {
 		if (saslc__valid_appname(appname) == false) {
 			saslc__error_set(ERR(ctx), ERROR_BADARG,
@@ -128,7 +123,7 @@
 
 	/* load the global and mechanism dictionaries */
 	if (saslc__parser_config(ctx) == -1) {
-		free((void *)(intptr_t)ctx->appname);
+		free(ctx->appname);
 		ctx->appname = NULL;
 		saslc__dict_destroy(ctx->prop);
 		ctx->prop = NULL;
@@ -180,20 +175,13 @@
 		return -1;
 	}
 
-	/* mechanism list */
 	if (ctx->mechanisms != NULL)
 		saslc__mech_list_destroy(ctx->mechanisms);
 
-	/* properties */
 	if (ctx->prop != NULL)
 		saslc__dict_destroy(ctx->prop);
 
-	/* application name */
-	if (ctx->appname != NULL)
-		free((void *)(intptr_t)ctx->appname);
-
-        /* free context */
-        free(ctx);
-
-        return 0;
+	free(ctx->appname);
+	free(ctx);
+	return 0;
 }
Index: src/crypto/external/bsd/libsaslc/dist/src/saslc_private.h
diff -u src/crypto/external/bsd/libsaslc/dist/src/saslc_private.h:1.3 src/crypto/external/bsd/libsaslc/dist/src/saslc_private.h:1.4
--- src/crypto/external/bsd/libsaslc/dist/src/saslc_private.h:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/saslc_private.h	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: saslc_private.h,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: saslc_private.h,v 1.4 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -40,6 +40,7 @@
 
 #include <saslc.h>
 #include <stdint.h>
+
 #include "dict.h"
 #include "error.h"
 #include "mech.h"

Index: src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c
diff -u src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c:1.6 src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c:1.7
--- src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c:1.6	Sat Feb 12 17:46:14 2011
+++ src/crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c	Sat Feb 12 18:21:32 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: mech_digestmd5.c,v 1.6 2011/02/12 22:46:14 christos Exp $ */
+/* $NetBSD: mech_digestmd5.c,v 1.7 2011/02/12 23:21:32 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,17 +35,19 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mech_digestmd5.c,v 1.6 2011/02/12 22:46:14 christos Exp $");
+__RCSID("$NetBSD: mech_digestmd5.c,v 1.7 2011/02/12 23:21:32 christos Exp $");
+
+#include <sys/param.h>
 
 #include <assert.h>
+#include <ctype.h>
 #include <md5.h>
 #include <saslc.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
-#include <ctype.h>
+
 #include <openssl/evp.h>
-#include <sys/param.h>
 
 #include "buffer.h"
 #include "crypto.h"
@@ -201,7 +203,7 @@
 	uint8_t *key;			/* key for coding */
 	uint32_t seqnum;		/* 4 byte sequence number */
 
-	void         *buf_ctx;		/* buffer context */
+	void *buf_ctx;			/* buffer context */
 	cipher_context_t *cph_ctx;	/* cipher context */
 	saslc_sess_t *sess;		/* session: for error setting */
 } coder_context_t;
@@ -231,8 +233,8 @@
 
 	src = (unsigned char *)utf8;
 	cnt = 0;
-        end = src + strlen(utf8);
-        for (s = src; s < end; ++s) {
+	end = src + strlen(utf8);
+	for (s = src; s < end; ++s) {
 		if (*s > 0xC3) /* abort if outside 8859-1 range */
 			return -1;
 		/*
@@ -244,7 +246,7 @@
 				return -1;	/* broken utf-8 encoding */
 		}
 		cnt++;
-        }
+	}
 
 	/* Allocate adequate space. */
 	d = malloc(cnt + 1);
@@ -254,14 +256,14 @@
 	*iso8859 = (char *)d;
 
 	/* convert to 8859-1 */
-        do {
+	do {
 		for (s = src; s < end && *s < 0xC0; ++s)
 			*d++ = *s;
 		if (s + 1 >= end)
 			break;
 		*d++ = ((s[0] & 0x3) << 6) | (s[1] & 0x3f);
 		src = s + 2;
-        } while (src < end);
+	} while (src < end);
 
 	*d = '\0';
 	return 0;
@@ -319,11 +321,11 @@
 	if ((unq_username = unq(ms->rdata.authcid)) == NULL)
 		return -1;
 
-        /********************************************************/
+	/********************************************************/
 	/* RFC 2831 section 2.1.2				*/
 	/* ...  If the directive is missing, "realm-value" will */
 	/* set to the empty string when computing A1.	  	*/
-        /********************************************************/
+	/********************************************************/
 	if (ms->rdata.realm == NULL)
 		unq_realm = strdup("");
 	else
@@ -809,13 +811,13 @@
 	char *p;
 
 	/*****************************************************************/
-        /* The realm containing the user's account. This directive is	 */
+	/* The realm containing the user's account. This directive is	 */
 	/* required if the server provided any realms in the		 */
 	/* "digest-challenge", in which case it may appear exactly once  */
 	/* and its value SHOULD be one of those realms. If the directive */
 	/* is missing, "realm-value" will set to the empty string when	 */
 	/* computing A1 (see below for details).			 */
-        /*****************************************************************/
+	/*****************************************************************/
 
 	hostname    = saslc_sess_getprop(sess, SASLC_DIGESTMD5_HOSTNAME);
 	user_realms = saslc_sess_getprop(sess, SASLC_DIGESTMD5_REALM);
@@ -873,13 +875,11 @@
 cipher_context_destroy(cipher_context_t *ctx)
 {
 
-	if (ctx == NULL)
-		return;
-
-	if (ctx->evp_ctx != NULL)
-		EVP_CIPHER_CTX_free(ctx->evp_ctx);
-
-	free(ctx);
+	if (ctx != NULL) {
+		if (ctx->evp_ctx != NULL)
+			EVP_CIPHER_CTX_free(ctx->evp_ctx);
+		free(ctx);
+	}
 }
 
 /**
@@ -1799,30 +1799,23 @@
 free_cdata(cdata_t *cdata)
 {
 
-	if (cdata->nonce != NULL)
-		free(cdata->nonce);
-	if (cdata->realm != NULL)
-		saslc__list_free(cdata->realm);
+	free(cdata->nonce);
+	saslc__list_free(cdata->realm);
 }
 
 static void
 free_rdata(rdata_t *rdata)
 {
 
-	if (rdata->authcid != NULL)
-		free(rdata->authcid);
-	if (rdata->authzid != NULL)
-		free(rdata->authzid);
-	if (rdata->cnonce != NULL)
-		free(rdata->cnonce);
-	if (rdata->digesturi != NULL)
-		free(rdata->digesturi);
+	free(rdata->authcid);
+	free(rdata->authzid);
+	free(rdata->cnonce);
+	free(rdata->digesturi);
 	if (rdata->passwd != NULL) {
 		memset(rdata->passwd, 0, strlen(rdata->passwd));
 		free(rdata->passwd);
 	}
-	if (rdata->realm != NULL)
-		free(rdata->realm);
+	free(rdata->realm);
 }
 
 /**

Index: src/crypto/external/bsd/libsaslc/dist/test/Atffile
diff -u src/crypto/external/bsd/libsaslc/dist/test/Atffile:1.2 src/crypto/external/bsd/libsaslc/dist/test/Atffile:1.3
--- src/crypto/external/bsd/libsaslc/dist/test/Atffile:1.2	Sat Jan 29 18:35:31 2011
+++ src/crypto/external/bsd/libsaslc/dist/test/Atffile	Sat Feb 12 18:21:33 2011
@@ -2,7 +2,6 @@
 
 prop: test-suite = saslc
 
-tp: t_mech
 tp: t_crypto
 tp: t_dict
 tp: t_error

Index: src/crypto/external/bsd/libsaslc/dist/test/Makefile
diff -u src/crypto/external/bsd/libsaslc/dist/test/Makefile:1.3 src/crypto/external/bsd/libsaslc/dist/test/Makefile:1.4
--- src/crypto/external/bsd/libsaslc/dist/test/Makefile:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/test/Makefile	Sat Feb 12 18:21:33 2011
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2011/02/11 23:44:43 christos Exp $
+# $NetBSD: Makefile,v 1.4 2011/02/12 23:21:33 christos Exp $
 
 CC=gcc
 SRC_PREFIX=../src
@@ -6,7 +6,6 @@
 ATFLIBS=-latf-c -lssl
 LDFLAGS=`pwd`/$(SRC_PREFIX)/libsaslc.so -ggdb
 TEST_CASES_C=t_dict t_session t_crypto t_error t_saslc t_parser
-TEST_CASES_SH=t_mech
 TEST_CASES=$(TEST_CASES_C)
 VALGRIND=valgrind
 VALGRIND_OPTS=--leak-check=full -q
Index: src/crypto/external/bsd/libsaslc/dist/test/example_client.c
diff -u src/crypto/external/bsd/libsaslc/dist/test/example_client.c:1.3 src/crypto/external/bsd/libsaslc/dist/test/example_client.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/test/example_client.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/test/example_client.c	Sat Feb 12 18:21:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: example_client.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: example_client.c,v 1.4 2011/02/12 23:21:33 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,14 +35,15 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: example_client.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
-#include <stdio.h>
-#include <saslc.h>
+__RCSID("$NetBSD: example_client.c,v 1.4 2011/02/12 23:21:33 christos Exp $");
+
 #include <err.h>
-#include <unistd.h>
+#include <limits.h>
+#include <saslc.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <limits.h>
+#include <unistd.h>
 
 static void
 print_help(void)
@@ -150,14 +151,14 @@
 		cont = saslc_sess_cont(sess, input, input_len, (void **)&output,
 		    &output_len);
 		if (cont < 0)
-		        goto error_sess;
-                printf("%s\n", output == NULL ? "empty line" : output);
+			goto error_sess;
+		printf("%s\n", output == NULL ? "empty line" : output);
 		if (cont == 0)
 			break;
 	}
 
 	saslc_sess_end(sess);
-	if (saslc_end(ctx, true) < 0)
+	if (saslc_end(ctx) < 0)
 		goto error;
 
 	return 0;
Index: src/crypto/external/bsd/libsaslc/dist/test/t_crypto.c
diff -u src/crypto/external/bsd/libsaslc/dist/test/t_crypto.c:1.3 src/crypto/external/bsd/libsaslc/dist/test/t_crypto.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/test/t_crypto.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/test/t_crypto.c	Sat Feb 12 18:21:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_crypto.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: t_crypto.c,v 1.4 2011/02/12 23:21:33 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,11 +35,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_crypto.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: t_crypto.c,v 1.4 2011/02/12 23:21:33 christos Exp $");
 
 #include <atf-c.h>
-#include <stdio.h>
 #include <saslc.h>
+#include <stdio.h>
 #include <string.h>
 
 #include "crypto.h"
Index: src/crypto/external/bsd/libsaslc/dist/test/t_dict.c
diff -u src/crypto/external/bsd/libsaslc/dist/test/t_dict.c:1.3 src/crypto/external/bsd/libsaslc/dist/test/t_dict.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/test/t_dict.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/test/t_dict.c	Sat Feb 12 18:21:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_dict.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: t_dict.c,v 1.4 2011/02/12 23:21:33 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,14 +35,13 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_dict.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: t_dict.c,v 1.4 2011/02/12 23:21:33 christos Exp $");
 
 #include <atf-c.h>
 #include <stdio.h>
 
 #include "dict.h"
 
-
 /* src/dict.c test cases */
 
 /* saslc__dict_create() */
Index: src/crypto/external/bsd/libsaslc/dist/test/t_error.c
diff -u src/crypto/external/bsd/libsaslc/dist/test/t_error.c:1.3 src/crypto/external/bsd/libsaslc/dist/test/t_error.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/test/t_error.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/test/t_error.c	Sat Feb 12 18:21:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_error.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: t_error.c,v 1.4 2011/02/12 23:21:33 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,17 +35,16 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
+__RCSID("$NetBSD: t_error.c,v 1.4 2011/02/12 23:21:33 christos Exp $");
 
-__RCSID("$NetBSD: t_error.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
 #include <atf-c.h>
-#include <stdio.h>
 #include <saslc.h>
+#include <stdio.h>
 #include <string.h>
 
 #include "error.h"
 #include "saslc_private.h"
 
-
 ATF_TC(t_saslc__error);
 ATF_TC_HEAD(t_saslc__error, tc)
 {
@@ -63,7 +62,7 @@
 	ATF_CHECK_STREQ(saslc_strerror(ctx), "test");
 	saslc__error_set_errno(ERR(ctx), ERROR_NOMEM);
 	ATF_CHECK_STREQ(saslc_strerror(ctx), "no memory available");
-        ATF_REQUIRE_EQ(saslc_end(ctx, false), 0);
+	ATF_REQUIRE_EQ(saslc_end(ctx), 0);
 }
 
 ATF_TP_ADD_TCS(tp)
Index: src/crypto/external/bsd/libsaslc/dist/test/t_parser.c
diff -u src/crypto/external/bsd/libsaslc/dist/test/t_parser.c:1.3 src/crypto/external/bsd/libsaslc/dist/test/t_parser.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/test/t_parser.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/test/t_parser.c	Sat Feb 12 18:21:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_parser.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: t_parser.c,v 1.4 2011/02/12 23:21:33 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,12 +35,13 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_parser.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: t_parser.c,v 1.4 2011/02/12 23:21:33 christos Exp $");
+
 #include <atf-c.h>
-#include <stdio.h>
-#include <dict.h>
 #include <saslc.h>
+#include <stdio.h>
 
+#include "dict.h"
 #include "parser.h"
 
 
@@ -60,8 +61,8 @@
 
         if (dir == NULL)
             exit(-1);
-	
-        setenv(SASLC__ENV_PATH, dir, 1);
+
+        setenv(SASLC_ENV_CONFIG, dir, 1);
         free(dir);
 }
 
@@ -69,23 +70,23 @@
 ATF_TC(t_parser_test1);
 ATF_TC_HEAD(t_parser_test1, tc)
 {
-        set_env(tc);
+	set_env(tc);
 	atf_tc_set_md_var(tc, "descr", "parser test1");
 }
 ATF_TC_BODY(t_parser_test1, tc)
 {
 	saslc_t *ctx;
-        
+
 	ATF_REQUIRE(ctx = saslc_alloc());
 	ATF_CHECK_EQ(saslc_init(ctx, "test1", NULL), 0);
-	ATF_REQUIRE_EQ(saslc_end(ctx, true), 0);
+	ATF_REQUIRE_EQ(saslc_end(ctx), 0);
 }
 
 ATF_TC(t_parser_test2);
 ATF_TC_HEAD(t_parser_test2, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "parser test2");
-        set_env(tc);
+	set_env(tc);
 }
 ATF_TC_BODY(t_parser_test2, tc)
 {
@@ -104,15 +105,15 @@
 	ATF_CHECK_STREQ(val, "one two three");
 	ATF_REQUIRE(val = saslc_sess_getprop(sess, "ID"));
 	ATF_CHECK_STREQ(val, "6669");
-        saslc_sess_end(sess);
-	ATF_REQUIRE_EQ(saslc_end(ctx, false), 0);
+	saslc_sess_end(sess);
+	ATF_REQUIRE_EQ(saslc_end(ctx), 0);
 }
 
 ATF_TC(t_parser_test3);
 ATF_TC_HEAD(t_parser_test3, tc)
 {
 	atf_tc_set_md_var(tc, "descr", "parser test3");
-        set_env(tc);
+	set_env(tc);
 }
 ATF_TC_BODY(t_parser_test3, tc)
 {
@@ -121,8 +122,7 @@
 
 	ATF_REQUIRE(ctx = saslc_alloc());
 	ATF_CHECK_EQ(saslc_init(ctx, "test3", NULL), -1);
-	ATF_CHECK_EQ(saslc_init(ctx, "test3"), -1);
-	ATF_REQUIRE_EQ(saslc_end(ctx, false), 0);
+	ATF_REQUIRE_EQ(saslc_end(ctx), 0);
 }
 
 
Index: src/crypto/external/bsd/libsaslc/dist/test/t_saslc.c
diff -u src/crypto/external/bsd/libsaslc/dist/test/t_saslc.c:1.3 src/crypto/external/bsd/libsaslc/dist/test/t_saslc.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/test/t_saslc.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/test/t_saslc.c	Sat Feb 12 18:21:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_saslc.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: t_saslc.c,v 1.4 2011/02/12 23:21:33 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,11 +35,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_saslc.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: t_saslc.c,v 1.4 2011/02/12 23:21:33 christos Exp $");
 
 #include <atf-c.h>
-#include <stdio.h>
 #include <saslc.h>
+#include <stdio.h>
 
 
 ATF_TC(t_session_init);
Index: src/crypto/external/bsd/libsaslc/dist/test/t_session.c
diff -u src/crypto/external/bsd/libsaslc/dist/test/t_session.c:1.3 src/crypto/external/bsd/libsaslc/dist/test/t_session.c:1.4
--- src/crypto/external/bsd/libsaslc/dist/test/t_session.c:1.3	Fri Feb 11 18:44:43 2011
+++ src/crypto/external/bsd/libsaslc/dist/test/t_session.c	Sat Feb 12 18:21:33 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_session.c,v 1.3 2011/02/11 23:44:43 christos Exp $ */
+/* $NetBSD: t_session.c,v 1.4 2011/02/12 23:21:33 christos Exp $ */
 
 /* Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,8 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_session.c,v 1.3 2011/02/11 23:44:43 christos Exp $");
+__RCSID("$NetBSD: t_session.c,v 1.4 2011/02/12 23:21:33 christos Exp $");
+
 #include <atf-c.h>
 #include <saslc.h>
 #include <stdio.h>
@@ -48,7 +49,7 @@
 }
 ATF_TC_BODY(t_sess, tc)
 {
-        saslc_t *ctx;
+	saslc_t *ctx;
 	saslc_sess_t *sess;
 
 	ATF_REQUIRE(ctx = saslc_alloc());
@@ -65,9 +66,9 @@
 		saslc_sess_end(sess);
 	ATF_REQUIRE(sess = saslc_sess_init(ctx, "LOGiN", NULL));
 	ATF_CHECK_STREQ(saslc_sess_getmech(sess), "LOGIN");
-	ATF_REQUIRE_EQ(saslc_end(ctx, false), -1);
+	ATF_REQUIRE_EQ(saslc_end(ctx), -1);
 	saslc_sess_end(sess);
-	ATF_REQUIRE_EQ(saslc_end(ctx, false), 0);
+	ATF_REQUIRE_EQ(saslc_end(ctx), 0);
 }
 
 ATF_TP_ADD_TCS(tp)

Reply via email to