Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/libsaslc/dist Fix botched merges of the ...
details: https://anonhg.NetBSD.org/src/rev/f00013009ecb
branches: trunk
changeset: 761998:f00013009ecb
user: christos <christos%NetBSD.org@localhost>
date: Sat Feb 12 23:21:32 2011 +0000
description:
Fix botched merges of the patch that Anon Ymous sent. From Anon Ymous
diffstat:
crypto/external/bsd/libsaslc/dist/man/libsaslc.3 | 10 +-
crypto/external/bsd/libsaslc/dist/src/buffer.c | 7 +-
crypto/external/bsd/libsaslc/dist/src/crypto.c | 7 +-
crypto/external/bsd/libsaslc/dist/src/dict.c | 17 ++--
crypto/external/bsd/libsaslc/dist/src/dict.h | 4 +-
crypto/external/bsd/libsaslc/dist/src/error.c | 5 +-
crypto/external/bsd/libsaslc/dist/src/list.c | 9 +-
crypto/external/bsd/libsaslc/dist/src/mech.c | 11 +-
crypto/external/bsd/libsaslc/dist/src/mech.h | 11 +-
crypto/external/bsd/libsaslc/dist/src/mech_crammd5.c | 7 +-
crypto/external/bsd/libsaslc/dist/src/mech_digestmd5.c | 63 +++++++---------
crypto/external/bsd/libsaslc/dist/src/mech_gssapi.c | 16 ++-
crypto/external/bsd/libsaslc/dist/src/mech_plain.c | 6 +-
crypto/external/bsd/libsaslc/dist/src/msg.c | 7 +-
crypto/external/bsd/libsaslc/dist/src/parser.c | 9 +-
crypto/external/bsd/libsaslc/dist/src/saslc.c | 38 +++------
crypto/external/bsd/libsaslc/dist/src/saslc_private.h | 3 +-
crypto/external/bsd/libsaslc/dist/src/xsess.c | 22 ++---
crypto/external/bsd/libsaslc/dist/test/Atffile | 1 -
crypto/external/bsd/libsaslc/dist/test/Makefile | 3 +-
crypto/external/bsd/libsaslc/dist/test/example_client.c | 19 ++--
crypto/external/bsd/libsaslc/dist/test/t_crypto.c | 6 +-
crypto/external/bsd/libsaslc/dist/test/t_dict.c | 5 +-
crypto/external/bsd/libsaslc/dist/test/t_error.c | 9 +-
crypto/external/bsd/libsaslc/dist/test/t_parser.c | 30 ++++----
crypto/external/bsd/libsaslc/dist/test/t_saslc.c | 6 +-
crypto/external/bsd/libsaslc/dist/test/t_session.c | 11 +-
27 files changed, 161 insertions(+), 181 deletions(-)
diffs (truncated from 1181 to 300 lines):
diff -r 91abc93c40fa -r f00013009ecb crypto/external/bsd/libsaslc/dist/man/libsaslc.3
--- a/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Sat Feb 12 23:10:22 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/man/libsaslc.3 Sat Feb 12 23:21:32 2011 +0000
@@ -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"
diff -r 91abc93c40fa -r f00013009ecb crypto/external/bsd/libsaslc/dist/src/buffer.c
--- a/crypto/external/bsd/libsaslc/dist/src/buffer.c Sat Feb 12 23:10:22 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/buffer.c Sat Feb 12 23:21:32 2011 +0000
@@ -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"
diff -r 91abc93c40fa -r f00013009ecb crypto/external/bsd/libsaslc/dist/src/crypto.c
--- a/crypto/external/bsd/libsaslc/dist/src/crypto.c Sat Feb 12 23:10:22 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/crypto.c Sat Feb 12 23:21:32 2011 +0000
@@ -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"
diff -r 91abc93c40fa -r f00013009ecb crypto/external/bsd/libsaslc/dist/src/dict.c
--- a/crypto/external/bsd/libsaslc/dist/src/dict.c Sat Feb 12 23:10:22 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/dict.c Sat Feb 12 23:21:32 2011 +0000
@@ -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;
diff -r 91abc93c40fa -r f00013009ecb crypto/external/bsd/libsaslc/dist/src/dict.h
--- a/crypto/external/bsd/libsaslc/dist/src/dict.h Sat Feb 12 23:10:22 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/dict.h Sat Feb 12 23:21:32 2011 +0000
@@ -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 <stdbool.h>
#include <stdlib.h>
-#include <stdbool.h>
typedef enum {
DICT_OK = 0,
diff -r 91abc93c40fa -r f00013009ecb crypto/external/bsd/libsaslc/dist/src/error.c
--- a/crypto/external/bsd/libsaslc/dist/src/error.c Sat Feb 12 23:10:22 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/error.c Sat Feb 12 23:21:32 2011 +0000
@@ -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
diff -r 91abc93c40fa -r f00013009ecb crypto/external/bsd/libsaslc/dist/src/list.c
--- a/crypto/external/bsd/libsaslc/dist/src/list.c Sat Feb 12 23:10:22 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/list.c Sat Feb 12 23:21:32 2011 +0000
@@ -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 <stdio.h>
#include <stdlib.h>
-#include <stdio.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;
}
}
diff -r 91abc93c40fa -r f00013009ecb crypto/external/bsd/libsaslc/dist/src/mech.c
--- a/crypto/external/bsd/libsaslc/dist/src/mech.c Sat Feb 12 23:10:22 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/mech.c Sat Feb 12 23:21:32 2011 +0000
@@ -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;
}
diff -r 91abc93c40fa -r f00013009ecb crypto/external/bsd/libsaslc/dist/src/mech.h
--- a/crypto/external/bsd/libsaslc/dist/src/mech.h Sat Feb 12 23:10:22 2011 +0000
+++ b/crypto/external/bsd/libsaslc/dist/src/mech.h Sat Feb 12 23:21:32 2011 +0000
@@ -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 @@
Home |
Main Index |
Thread Index |
Old Index