Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jan 2013 16:00:43 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r246073 - in projects/physbio: contrib/bind9/lib/dns contrib/dialog/samples lib/libc/gen lib/libc/nls share/syscons/keymaps sys/arm/arm sys/arm/conf sys/boot/fdt/dts sys/kern sys/rpc sy...
Message-ID:  <201301291600.r0TG0h5c059371@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Jan 29 16:00:43 2013
New Revision: 246073
URL: http://svnweb.freebsd.org/changeset/base/246073

Log:
  Copy missed files

Added:
     - copied unchanged from r246072, head/contrib/bind9/lib/dns/opensslecdsa_link.c
     - copied unchanged from r246072, head/contrib/dialog/samples/dselect
     - copied unchanged from r246072, head/contrib/dialog/samples/valgrind.log
     - copied unchanged from r246072, head/lib/libc/gen/unvis-compat.c
     - copied unchanged from r246072, head/lib/libc/nls/zh_CN.GB18030.msg
     - copied unchanged from r246072, head/lib/libc/nls/zh_CN.GB2312.msg
     - copied unchanged from r246072, head/lib/libc/nls/zh_CN.UTF-8.msg
     - copied unchanged from r246072, head/share/syscons/keymaps/us.dvorakp.kbd
     - copied unchanged from r246072, head/sys/arm/arm/cpufunc_asm_arm11x6.S
     - copied unchanged from r246072, head/sys/arm/arm/pl190.c
     - copied unchanged from r246072, head/sys/arm/conf/VERSATILEPB
     - copied unchanged from r246072, head/sys/boot/fdt/dts/versatilepb.dts
     - copied unchanged from r246072, head/sys/kern/subr_busdma_bufalloc.c
     - copied unchanged from r246072, head/sys/rpc/krpc.h
     - copied unchanged from r246072, head/sys/security/audit/bsm_domain.c
     - copied unchanged from r246072, head/sys/security/audit/bsm_errno.c
     - copied unchanged from r246072, head/sys/security/audit/bsm_fcntl.c
     - copied unchanged from r246072, head/sys/security/audit/bsm_socket_type.c
     - copied unchanged from r246072, head/sys/security/audit/bsm_token.c
     - copied unchanged from r246072, head/sys/sys/busdma_bufalloc.h
     - copied unchanged from r246072, head/tools/regression/usr.bin/printf/regress.zero.out
     - copied unchanged from r246072, head/usr.sbin/pkg/dns_utils.h
Directory Properties:
  projects/physbio/contrib/bind9/lib/dns/opensslecdsa_link.c   (props changed)
  projects/physbio/contrib/dialog/samples/dselect   (props changed)
  projects/physbio/contrib/dialog/samples/valgrind.log   (props changed)
  projects/physbio/lib/libc/gen/unvis-compat.c   (props changed)
  projects/physbio/lib/libc/nls/zh_CN.GB18030.msg   (props changed)
  projects/physbio/lib/libc/nls/zh_CN.GB2312.msg   (props changed)
  projects/physbio/lib/libc/nls/zh_CN.UTF-8.msg   (props changed)
  projects/physbio/share/syscons/keymaps/us.dvorakp.kbd   (props changed)
  projects/physbio/sys/arm/arm/cpufunc_asm_arm11x6.S   (props changed)
  projects/physbio/sys/arm/arm/pl190.c   (props changed)
  projects/physbio/sys/arm/conf/VERSATILEPB   (props changed)
  projects/physbio/sys/boot/fdt/dts/versatilepb.dts   (props changed)
  projects/physbio/sys/kern/subr_busdma_bufalloc.c   (props changed)
  projects/physbio/sys/rpc/krpc.h   (props changed)
  projects/physbio/sys/security/audit/bsm_domain.c   (props changed)
  projects/physbio/sys/security/audit/bsm_errno.c   (props changed)
  projects/physbio/sys/security/audit/bsm_fcntl.c   (props changed)
  projects/physbio/sys/security/audit/bsm_socket_type.c   (props changed)
  projects/physbio/sys/security/audit/bsm_token.c   (props changed)
  projects/physbio/sys/sys/busdma_bufalloc.h   (props changed)
  projects/physbio/tools/regression/usr.bin/printf/regress.zero.out   (props changed)
  projects/physbio/usr.sbin/pkg/dns_utils.h   (props changed)

Copied: projects/physbio/contrib/bind9/lib/dns/opensslecdsa_link.c (from r246072, head/contrib/bind9/lib/dns/opensslecdsa_link.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/physbio/contrib/bind9/lib/dns/opensslecdsa_link.c	Tue Jan 29 16:00:43 2013	(r246073, copy of r246072, head/contrib/bind9/lib/dns/opensslecdsa_link.c)
@@ -0,0 +1,596 @@
+/*
+ * Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+ * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+ * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/* $Id$ */
+
+#include <config.h>
+
+#ifdef HAVE_OPENSSL_ECDSA
+
+#if !defined(HAVE_EVP_SHA256) || !defined(HAVE_EVP_SHA384)
+#error "ECDSA without EVP for SHA2?"
+#endif
+
+#include <isc/entropy.h>
+#include <isc/mem.h>
+#include <isc/sha2.h>
+#include <isc/string.h>
+#include <isc/util.h>
+
+#include <dns/keyvalues.h>
+#include <dst/result.h>
+
+#include "dst_internal.h"
+#include "dst_openssl.h"
+#include "dst_parse.h"
+
+#include <openssl/err.h>
+#include <openssl/objects.h>
+#include <openssl/ecdsa.h>
+#include <openssl/bn.h>
+
+#ifndef NID_X9_62_prime256v1
+#error "P-256 group is not known (NID_X9_62_prime256v1)"
+#endif
+#ifndef NID_secp384r1
+#error "P-384 group is not known (NID_secp384r1)"
+#endif
+
+#define DST_RET(a) {ret = a; goto err;}
+
+static isc_result_t opensslecdsa_todns(const dst_key_t *key,
+				       isc_buffer_t *data);
+
+static isc_result_t
+opensslecdsa_createctx(dst_key_t *key, dst_context_t *dctx) {
+	EVP_MD_CTX *evp_md_ctx;
+	const EVP_MD *type = NULL;
+
+	UNUSED(key);
+	REQUIRE(dctx->key->key_alg == DST_ALG_ECDSA256 ||
+		dctx->key->key_alg == DST_ALG_ECDSA384);
+
+	evp_md_ctx = EVP_MD_CTX_create();
+	if (evp_md_ctx == NULL)
+		return (ISC_R_NOMEMORY);
+	if (dctx->key->key_alg == DST_ALG_ECDSA256)
+		type = EVP_sha256();
+	else
+		type = EVP_sha384();
+
+	if (!EVP_DigestInit_ex(evp_md_ctx, type, NULL)) {
+		EVP_MD_CTX_destroy(evp_md_ctx);
+		return (dst__openssl_toresult2("EVP_DigestInit_ex",
+					       ISC_R_FAILURE));
+	}
+
+	dctx->ctxdata.evp_md_ctx = evp_md_ctx;
+
+	return (ISC_R_SUCCESS);
+}
+
+static void
+opensslecdsa_destroyctx(dst_context_t *dctx) {
+	EVP_MD_CTX *evp_md_ctx = dctx->ctxdata.evp_md_ctx;
+
+	REQUIRE(dctx->key->key_alg == DST_ALG_ECDSA256 ||
+		dctx->key->key_alg == DST_ALG_ECDSA384);
+
+	if (evp_md_ctx != NULL) {
+		EVP_MD_CTX_destroy(evp_md_ctx);
+		dctx->ctxdata.evp_md_ctx = NULL;
+	}
+}
+
+static isc_result_t
+opensslecdsa_adddata(dst_context_t *dctx, const isc_region_t *data) {
+	EVP_MD_CTX *evp_md_ctx = dctx->ctxdata.evp_md_ctx;
+
+	REQUIRE(dctx->key->key_alg == DST_ALG_ECDSA256 ||
+		dctx->key->key_alg == DST_ALG_ECDSA384);
+
+	if (!EVP_DigestUpdate(evp_md_ctx, data->base, data->length))
+		return (dst__openssl_toresult2("EVP_DigestUpdate",
+					       ISC_R_FAILURE));
+
+	return (ISC_R_SUCCESS);
+}
+
+static int
+BN_bn2bin_fixed(BIGNUM *bn, unsigned char *buf, int size) {
+	int bytes = size - BN_num_bytes(bn);
+
+	while (bytes-- > 0)
+		*buf++ = 0;
+	BN_bn2bin(bn, buf);
+	return (size);
+}
+
+static isc_result_t
+opensslecdsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
+	isc_result_t ret;
+	dst_key_t *key = dctx->key;
+	isc_region_t r;
+	ECDSA_SIG *ecdsasig;
+	EVP_MD_CTX *evp_md_ctx = dctx->ctxdata.evp_md_ctx;
+	EVP_PKEY *pkey = key->keydata.pkey;
+	EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
+	unsigned int dgstlen, siglen;
+	unsigned char digest[EVP_MAX_MD_SIZE];
+
+	REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+		key->key_alg == DST_ALG_ECDSA384);
+
+	if (eckey == NULL)
+		return (ISC_R_FAILURE);
+
+	if (key->key_alg == DST_ALG_ECDSA256)
+		siglen = DNS_SIG_ECDSA256SIZE;
+	else
+		siglen = DNS_SIG_ECDSA384SIZE;
+
+	isc_buffer_availableregion(sig, &r);
+	if (r.length < siglen)
+		DST_RET(ISC_R_NOSPACE);
+
+	if (!EVP_DigestFinal(evp_md_ctx, digest, &dgstlen))
+		DST_RET(dst__openssl_toresult2("EVP_DigestFinal",
+					       ISC_R_FAILURE));
+
+	ecdsasig = ECDSA_do_sign(digest, dgstlen, eckey);
+	if (ecdsasig == NULL)
+		DST_RET(dst__openssl_toresult2("ECDSA_do_sign",
+					       DST_R_SIGNFAILURE));
+	BN_bn2bin_fixed(ecdsasig->r, r.base, siglen / 2);
+	r.base += siglen / 2;
+	BN_bn2bin_fixed(ecdsasig->s, r.base, siglen / 2);
+	r.base += siglen / 2;
+	ECDSA_SIG_free(ecdsasig);
+	isc_buffer_add(sig, siglen);
+	ret = ISC_R_SUCCESS;
+
+ err:
+	if (eckey != NULL)
+		EC_KEY_free(eckey);
+	return (ret);
+}
+
+static isc_result_t
+opensslecdsa_verify(dst_context_t *dctx, const isc_region_t *sig) {
+	isc_result_t ret;
+	dst_key_t *key = dctx->key;
+	int status;
+	unsigned char *cp = sig->base;
+	ECDSA_SIG *ecdsasig = NULL;
+	EVP_MD_CTX *evp_md_ctx = dctx->ctxdata.evp_md_ctx;
+	EVP_PKEY *pkey = key->keydata.pkey;
+	EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
+	unsigned int dgstlen, siglen;
+	unsigned char digest[EVP_MAX_MD_SIZE];
+
+	REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+		key->key_alg == DST_ALG_ECDSA384);
+
+	if (eckey == NULL)
+		return (ISC_R_FAILURE);
+
+	if (key->key_alg == DST_ALG_ECDSA256)
+		siglen = DNS_SIG_ECDSA256SIZE;
+	else
+		siglen = DNS_SIG_ECDSA384SIZE;
+
+	if (sig->length != siglen)
+		return (DST_R_VERIFYFAILURE);
+
+	if (!EVP_DigestFinal_ex(evp_md_ctx, digest, &dgstlen))
+		DST_RET (dst__openssl_toresult2("EVP_DigestFinal_ex",
+						ISC_R_FAILURE));
+
+	ecdsasig = ECDSA_SIG_new();
+	if (ecdsasig == NULL)
+		DST_RET (ISC_R_NOMEMORY);
+	ecdsasig->r = BN_bin2bn(cp, siglen / 2, NULL);
+	cp += siglen / 2;
+	ecdsasig->s = BN_bin2bn(cp, siglen / 2, NULL);
+	/* cp += siglen / 2; */
+
+	status = ECDSA_do_verify(digest, dgstlen, ecdsasig, eckey);
+	switch (status) {
+	case 1:
+		ret = ISC_R_SUCCESS;
+		break;
+	case 0:
+		ret = dst__openssl_toresult(DST_R_VERIFYFAILURE);
+		break;
+	default:
+		ret = dst__openssl_toresult2("ECDSA_do_verify",
+					     DST_R_VERIFYFAILURE);
+		break;
+	}
+
+ err:
+	if (ecdsasig != NULL)
+		ECDSA_SIG_free(ecdsasig);
+	if (eckey != NULL)
+		EC_KEY_free(eckey);
+	return (ret);
+}
+
+static isc_boolean_t
+opensslecdsa_compare(const dst_key_t *key1, const dst_key_t *key2) {
+	isc_boolean_t ret;
+	int status;
+	EVP_PKEY *pkey1 = key1->keydata.pkey;
+	EVP_PKEY *pkey2 = key2->keydata.pkey;
+	EC_KEY *eckey1 = NULL;
+	EC_KEY *eckey2 = NULL;
+	const BIGNUM *priv1, *priv2;
+
+	if (pkey1 == NULL && pkey2 == NULL)
+		return (ISC_TRUE);
+	else if (pkey1 == NULL || pkey2 == NULL)
+		return (ISC_FALSE);
+
+	eckey1 = EVP_PKEY_get1_EC_KEY(pkey1);
+	eckey2 = EVP_PKEY_get1_EC_KEY(pkey2);
+	if (eckey1 == NULL && eckey2 == NULL) {
+		DST_RET (ISC_TRUE);
+	} else if (eckey1 == NULL || eckey2 == NULL)
+		DST_RET (ISC_FALSE);
+
+	status = EVP_PKEY_cmp(pkey1, pkey2);
+	if (status != 1)
+		DST_RET (ISC_FALSE);
+
+	priv1 = EC_KEY_get0_private_key(eckey1);
+	priv2 = EC_KEY_get0_private_key(eckey2);
+	if (priv1 != NULL || priv2 != NULL) {
+		if (priv1 == NULL || priv2 == NULL)
+			DST_RET (ISC_FALSE);
+		if (BN_cmp(priv1, priv2) != 0)
+			DST_RET (ISC_FALSE);
+	}
+	ret = ISC_TRUE;
+
+ err:
+	if (eckey1 != NULL)
+		EC_KEY_free(eckey1);
+	if (eckey2 != NULL)
+		EC_KEY_free(eckey2);
+	return (ret);
+}
+
+static isc_result_t
+opensslecdsa_generate(dst_key_t *key, int unused, void (*callback)(int)) {
+	isc_result_t ret;
+	EVP_PKEY *pkey;
+	EC_KEY *eckey = NULL;
+	int group_nid;
+
+	REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+		key->key_alg == DST_ALG_ECDSA384);
+	UNUSED(unused);
+	UNUSED(callback);
+
+	if (key->key_alg == DST_ALG_ECDSA256)
+		group_nid = NID_X9_62_prime256v1;
+	else
+		group_nid = NID_secp384r1;
+
+	eckey = EC_KEY_new_by_curve_name(group_nid);
+	if (eckey == NULL)
+		return (dst__openssl_toresult2("EC_KEY_new_by_curve_name",
+					       DST_R_OPENSSLFAILURE));
+
+	if (EC_KEY_generate_key(eckey) != 1)
+		DST_RET (dst__openssl_toresult2("EC_KEY_generate_key",
+						DST_R_OPENSSLFAILURE));
+
+	pkey = EVP_PKEY_new();
+	if (pkey == NULL)
+		DST_RET (ISC_R_NOMEMORY);
+	if (!EVP_PKEY_set1_EC_KEY(pkey, eckey)) {
+		EVP_PKEY_free(pkey);
+		DST_RET (ISC_R_FAILURE);
+	}
+	key->keydata.pkey = pkey;
+	ret = ISC_R_SUCCESS;
+
+ err:
+	if (eckey != NULL)
+		EC_KEY_free(eckey);
+	return (ret);
+}
+
+static isc_boolean_t
+opensslecdsa_isprivate(const dst_key_t *key) {
+	isc_boolean_t ret;
+	EVP_PKEY *pkey = key->keydata.pkey;
+	EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
+
+	ret = ISC_TF(eckey != NULL && EC_KEY_get0_private_key(eckey) != NULL);
+	if (eckey != NULL)
+		EC_KEY_free(eckey);
+	return (ret);
+}
+
+static void
+opensslecdsa_destroy(dst_key_t *key) {
+	EVP_PKEY *pkey = key->keydata.pkey;
+
+	EVP_PKEY_free(pkey);
+	key->keydata.pkey = NULL;
+}
+
+static isc_result_t
+opensslecdsa_todns(const dst_key_t *key, isc_buffer_t *data) {
+	isc_result_t ret;
+	EVP_PKEY *pkey;
+	EC_KEY *eckey = NULL;
+	isc_region_t r;
+	int len;
+	unsigned char *cp;
+	unsigned char buf[DNS_KEY_ECDSA384SIZE + 1];
+
+	REQUIRE(key->keydata.pkey != NULL);
+
+	pkey = key->keydata.pkey;
+	eckey = EVP_PKEY_get1_EC_KEY(pkey);
+	if (eckey == NULL)
+		return (dst__openssl_toresult(ISC_R_FAILURE));
+	len = i2o_ECPublicKey(eckey, NULL);
+	/* skip form */
+	len--;
+
+	isc_buffer_availableregion(data, &r);
+	if (r.length < (unsigned int) len)
+		DST_RET (ISC_R_NOSPACE);
+	cp = buf;
+	if (!i2o_ECPublicKey(eckey, &cp))
+		DST_RET (dst__openssl_toresult(ISC_R_FAILURE));
+	memcpy(r.base, buf + 1, len);
+	isc_buffer_add(data, len);
+	ret = ISC_R_SUCCESS;
+
+ err:
+	if (eckey != NULL)
+		EC_KEY_free(eckey);
+	return (ret);
+}
+
+static isc_result_t
+opensslecdsa_fromdns(dst_key_t *key, isc_buffer_t *data) {
+	isc_result_t ret;
+	EVP_PKEY *pkey;
+	EC_KEY *eckey = NULL;
+	isc_region_t r;
+	int group_nid;
+	unsigned int len;
+	const unsigned char *cp;
+	unsigned char buf[DNS_KEY_ECDSA384SIZE + 1];
+
+	REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+		key->key_alg == DST_ALG_ECDSA384);
+
+	if (key->key_alg == DST_ALG_ECDSA256) {
+		len = DNS_KEY_ECDSA256SIZE;
+		group_nid = NID_X9_62_prime256v1;
+	} else {
+		len = DNS_KEY_ECDSA384SIZE;
+		group_nid = NID_secp384r1;
+	}
+
+	isc_buffer_remainingregion(data, &r);
+	if (r.length == 0)
+		return (ISC_R_SUCCESS);
+	if (r.length < len)
+		return (DST_R_INVALIDPUBLICKEY);
+
+	eckey = EC_KEY_new_by_curve_name(group_nid);
+	if (eckey == NULL)
+		return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+
+	buf[0] = POINT_CONVERSION_UNCOMPRESSED;
+	memcpy(buf + 1, r.base, len);
+	cp = buf;
+	if (o2i_ECPublicKey(&eckey,
+			    (const unsigned char **) &cp,
+			    (long) len + 1) == NULL)
+		DST_RET (dst__openssl_toresult(DST_R_INVALIDPUBLICKEY));
+	if (EC_KEY_check_key(eckey) != 1)
+		DST_RET (dst__openssl_toresult(DST_R_INVALIDPUBLICKEY));
+
+	pkey = EVP_PKEY_new();
+	if (pkey == NULL)
+		DST_RET (ISC_R_NOMEMORY);
+	if (!EVP_PKEY_set1_EC_KEY(pkey, eckey)) {
+		EVP_PKEY_free(pkey);
+		DST_RET (dst__openssl_toresult(ISC_R_FAILURE));
+	}
+
+	isc_buffer_forward(data, len);
+	key->keydata.pkey = pkey;
+	ret = ISC_R_SUCCESS;
+
+ err:
+	if (eckey != NULL)
+		EC_KEY_free(eckey);
+	return (ret);
+}
+
+static isc_result_t
+opensslecdsa_tofile(const dst_key_t *key, const char *directory) {
+	isc_result_t ret;
+	EVP_PKEY *pkey;
+	EC_KEY *eckey = NULL;
+	const BIGNUM *privkey;
+	dst_private_t priv;
+	unsigned char *buf = NULL;
+
+	if (key->keydata.pkey == NULL)
+		return (DST_R_NULLKEY);
+
+	pkey = key->keydata.pkey;
+	eckey = EVP_PKEY_get1_EC_KEY(pkey);
+	if (eckey == NULL)
+		return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+	privkey = EC_KEY_get0_private_key(eckey);
+	if (privkey == NULL)
+		DST_RET (ISC_R_FAILURE);
+
+	buf = isc_mem_get(key->mctx, BN_num_bytes(privkey));
+	if (buf == NULL)
+		DST_RET (ISC_R_NOMEMORY);
+
+	priv.elements[0].tag = TAG_ECDSA_PRIVATEKEY;
+	priv.elements[0].length = BN_num_bytes(privkey);
+	BN_bn2bin(privkey, buf);
+	priv.elements[0].data = buf;
+	priv.nelements = ECDSA_NTAGS;
+	ret = dst__privstruct_writefile(key, &priv, directory);
+
+ err:
+	if (eckey != NULL)
+		EC_KEY_free(eckey);
+	if (buf != NULL)
+		isc_mem_put(key->mctx, buf, BN_num_bytes(privkey));
+	return (ret);
+}
+
+static isc_result_t
+ecdsa_check(EC_KEY *eckey, dst_key_t *pub)
+{
+	isc_result_t ret = ISC_R_FAILURE;
+	EVP_PKEY *pkey;
+	EC_KEY *pubeckey = NULL;
+	const EC_POINT *pubkey;
+
+	if (pub == NULL)
+		return (ISC_R_SUCCESS);
+	pkey = pub->keydata.pkey;
+	if (pkey == NULL)
+		return (ISC_R_SUCCESS);
+	pubeckey = EVP_PKEY_get1_EC_KEY(pkey);
+	if (pubeckey == NULL)
+		return (ISC_R_SUCCESS);
+	pubkey = EC_KEY_get0_public_key(pubeckey);
+	if (pubkey == NULL)
+		DST_RET (ISC_R_SUCCESS);
+	if (EC_KEY_set_public_key(eckey, pubkey) != 1)
+		DST_RET (ISC_R_SUCCESS);
+	if (EC_KEY_check_key(eckey) == 1)
+		DST_RET (ISC_R_SUCCESS);
+
+ err:
+	if (pubeckey != NULL)
+		EC_KEY_free(pubeckey);
+	return (ret);
+}
+
+static isc_result_t
+opensslecdsa_parse(dst_key_t *key, isc_lex_t *lexer, dst_key_t *pub) {
+	dst_private_t priv;
+	isc_result_t ret;
+	EVP_PKEY *pkey;
+	EC_KEY *eckey = NULL;
+	BIGNUM *privkey;
+	int group_nid;
+	isc_mem_t *mctx = key->mctx;
+
+	REQUIRE(key->key_alg == DST_ALG_ECDSA256 ||
+		key->key_alg == DST_ALG_ECDSA384);
+
+	if (key->key_alg == DST_ALG_ECDSA256)
+		group_nid = NID_X9_62_prime256v1;
+	else
+		group_nid = NID_secp384r1;
+
+	eckey = EC_KEY_new_by_curve_name(group_nid);
+	if (eckey == NULL)
+		return (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+
+	/* read private key file */
+	ret = dst__privstruct_parse(key, DST_ALG_ECDSA256, lexer, mctx, &priv);
+	if (ret != ISC_R_SUCCESS)
+		goto err;
+
+	privkey = BN_bin2bn(priv.elements[0].data,
+			    priv.elements[0].length, NULL);
+	if (privkey == NULL)
+		DST_RET(ISC_R_NOMEMORY);
+	if (!EC_KEY_set_private_key(eckey, privkey))
+		DST_RET(ISC_R_NOMEMORY);
+	if (ecdsa_check(eckey, pub) != ISC_R_SUCCESS)
+		DST_RET(DST_R_INVALIDPRIVATEKEY);
+	dst__privstruct_free(&priv, mctx);
+	memset(&priv, 0, sizeof(priv));
+
+	pkey = EVP_PKEY_new();
+	if (pkey == NULL)
+		DST_RET (ISC_R_NOMEMORY);
+	if (!EVP_PKEY_set1_EC_KEY(pkey, eckey)) {
+		EVP_PKEY_free(pkey);
+		DST_RET (dst__openssl_toresult(DST_R_OPENSSLFAILURE));
+	}
+	key->keydata.pkey = pkey;
+	ret = ISC_R_SUCCESS;
+
+ err:
+	if (eckey != NULL)
+		EC_KEY_free(eckey);
+	dst__privstruct_free(&priv, mctx);
+	memset(&priv, 0, sizeof(priv));
+	return (ret);
+}
+
+static dst_func_t opensslecdsa_functions = {
+	opensslecdsa_createctx,
+	opensslecdsa_destroyctx,
+	opensslecdsa_adddata,
+	opensslecdsa_sign,
+	opensslecdsa_verify,
+	NULL, /*%< computesecret */
+	opensslecdsa_compare,
+	NULL, /*%< paramcompare */
+	opensslecdsa_generate,
+	opensslecdsa_isprivate,
+	opensslecdsa_destroy,
+	opensslecdsa_todns,
+	opensslecdsa_fromdns,
+	opensslecdsa_tofile,
+	opensslecdsa_parse,
+	NULL, /*%< cleanup */
+	NULL, /*%< fromlabel */
+	NULL, /*%< dump */
+	NULL, /*%< restore */
+};
+
+isc_result_t
+dst__opensslecdsa_init(dst_func_t **funcp) {
+	REQUIRE(funcp != NULL);
+	if (*funcp == NULL)
+		*funcp = &opensslecdsa_functions;
+	return (ISC_R_SUCCESS);
+}
+
+#else /* HAVE_OPENSSL_ECDSA */
+
+#include <isc/util.h>
+
+EMPTY_TRANSLATION_UNIT
+
+#endif /* HAVE_OPENSSL_ECDSA */
+/*! \file */

Copied: projects/physbio/contrib/dialog/samples/dselect (from r246072, head/contrib/dialog/samples/dselect)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/physbio/contrib/dialog/samples/dselect	Tue Jan 29 16:00:43 2013	(r246073, copy of r246072, head/contrib/dialog/samples/dselect)
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $Id: dselect,v 1.6 2010/01/13 10:20:03 tom Exp $
+
+. ./setup-vars
+
+exec 3>&1
+RESULT=`$DIALOG --title "Please choose a directory" "$@" --dselect $HOME/ 14 48 2>&1 1>&3`
+retval=$?
+exec 3>&-
+
+. ./report-string

Copied: projects/physbio/contrib/dialog/samples/valgrind.log (from r246072, head/contrib/dialog/samples/valgrind.log)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/physbio/contrib/dialog/samples/valgrind.log	Tue Jan 29 16:00:43 2013	(r246073, copy of r246072, head/contrib/dialog/samples/valgrind.log)
@@ -0,0 +1,847 @@
+==23273== Memcheck, a memory error detector.
+==23273== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
+==23273== Using LibVEX rev 1854, a library for dynamic binary translation.
+==23273== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
+==23273== Using valgrind-3.3.1-Debian, a dynamic binary instrumentation framework.
+==23273== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
+==23273== 
+--23273-- Command line
+--23273--    /usr/build/dialog/dialog-1.1-20110707/dialog
+--23273--    --title
+--23273--    YES/NO BOX
+--23273--    --clear
+--23273--    --yesno
+--23273--    Hi, this is a yes/no dialog box. You can use this to ask                  questions that have an answer of either yes or no.                  BTW, do you notice that long lines will be automatically                  wrapped around so that they can fit in the box? You can                  also control line breaking explicitly by inserting                  'backslash n' at any place you like, but in this case,                  auto wrap around will be disabled and you will have to                  control line breaking yourself.
+--23273--    15
+--23273--    61
+--23273-- Startup, with flags:
+--23273--    --suppressions=/usr/lib/valgrind/debian-libc6-dbg.supp
+--23273--    -v
+--23273--    --num-callers=10
+--23273--    --error-limit=no
+--23273--    --show-reachable=yes
+--23273--    --leak-resolution=high
+--23273--    --leak-check=yes
+--23273--    --show-reachable=yes
+--23273--    --log-fd=2
+--23273-- Contents of /proc/version:
+--23273--   Linux version 2.6.26-2-686 (Debian 2.6.26-26lenny3) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Sat Jun 11 14:54:10 UTC 2011
+--23273-- Arch and hwcaps: X86, x86-sse1-sse2
+--23273-- Page sizes: currently 4096, max supported 4096
+--23273-- Valgrind library directory: /usr/lib/valgrind
+--23273-- Reading syms from /lib/ld-2.7.so (0x4000000)
+--23273-- Reading debug info from /lib/ld-2.7.so...
+--23273-- ... CRC mismatch (computed 0f4d8d49 wanted a869dbba)
+--23273-- Reading debug info from /usr/lib/debug/lib/ld-2.7.so...
+--23273-- Reading syms from /usr/build/dialog/dialog-1.1-20110707/dialog (0x8048000)
+--23273-- Reading syms from /usr/lib/valgrind/x86-linux/memcheck (0x38000000)
+--23273--    object doesn't have a dynamic symbol table
+--23273-- Reading suppressions file: /usr/lib/valgrind/debian-libc6-dbg.supp
+--23273-- Reading suppressions file: /usr/lib/valgrind/default.supp
+--23273-- REDIR: 0x4015500 (index) redirected to 0x3802cf43 (vgPlain_x86_linux_REDIR_FOR_index)
+--23273-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_core.so (0x401E000)
+--23273-- Reading syms from /usr/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x4020000)
+==23273== WARNING: new redirection conflicts with existing -- ignoring it
+--23273--     new: 0x04015500 (index               ) R-> 0x040241e0 index
+--23273-- REDIR: 0x40156f0 (strlen) redirected to 0x4024490 (strlen)
+--23273-- Reading syms from /usr/lib/debug/libm-2.7.so (0x4027000)
+--23273-- Reading syms from /usr/lib/debug/libc-2.7.so (0x404D000)
+--23273-- REDIR: 0x40beaf0 (rindex) redirected to 0x40240c0 (rindex)
+--23273-- REDIR: 0x40bf760 (memset) redirected to 0x4025380 (memset)
+--23273-- REDIR: 0x40be160 (strcmp) redirected to 0x4024770 (strcmp)
+--23273-- REDIR: 0x40be700 (strlen) redirected to 0x4024470 (strlen)
+--23273-- REDIR: 0x40be910 (strncmp) redirected to 0x40246e0 (strncmp)
+--23273-- REDIR: 0x40bdff0 (index) redirected to 0x40241b0 (index)
+--23273-- REDIR: 0x40b9740 (free) redirected to 0x4022ad0 (free)
+--23273-- REDIR: 0x40bb2c0 (calloc) redirected to 0x4021d60 (calloc)
+--23273-- REDIR: 0x40c07e0 (strchrnul) redirected to 0x4025450 (strchrnul)
+--23273-- REDIR: 0x40bb5e0 (malloc) redirected to 0x4023cb0 (malloc)
+--23273-- REDIR: 0x40bfc80 (memcpy) redirected to 0x40248e0 (memcpy)
+--23273-- REDIR: 0x40be7b0 (strnlen) redirected to 0x4024430 (strnlen)
+--23273-- REDIR: 0x40bf7c0 (mempcpy) redirected to 0x40254b0 (mempcpy)
+--23273-- REDIR: 0x40be1f0 (strcpy) redirected to 0x40244d0 (strcpy)
+--23273-- REDIR: 0x40bba60 (realloc) redirected to 0x4023dc0 (realloc)
+--23273-- REDIR: 0x40bea20 (strncpy) redirected to 0x40245a0 (strncpy)
+--23273-- REDIR: 0x40bf690 (bcmp) redirected to 0x4025070 (bcmp)
+--23273-- REDIR: 0x40bde40 (strcat) redirected to 0x4024240 (strcat)
+==23273== 
+==23273== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 14 from 1)
+--23273-- 
+--23273-- supp:     14 dl-hack3-cond-1
+==23273== malloc/free: in use at exit: 72,482 bytes in 382 blocks.
+==23273== malloc/free: 419 allocs, 37 frees, 79,695 bytes allocated.
+==23273== 
+==23273== searching for pointers to 382 not-freed blocks.
+==23273== checked 149,580 bytes.
+==23273== 
+==23273== 6 bytes in 1 blocks are still reachable in loss record 1 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x8068E64: dlg_strclone (util.c:1740)
+==23273==    by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273==    by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
+==23273==    by 0x8059BBE: print_button (buttons.c:97)
+==23273==    by 0x805A265: dlg_draw_buttons (buttons.c:297)
+==23273==    by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 6 bytes in 1 blocks are still reachable in loss record 2 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x8068E64: dlg_strclone (util.c:1740)
+==23273==    by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273==    by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
+==23273==    by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 7 bytes in 2 blocks are still reachable in loss record 3 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x8068E64: dlg_strclone (util.c:1740)
+==23273==    by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273==    by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8059E3A: dlg_button_sizes (buttons.c:179)
+==23273==    by 0x8059F04: dlg_button_x_step (buttons.c:209)
+==23273==    by 0x805A02F: dlg_button_layout (buttons.c:234)
+==23273==    by 0x806A11F: dialog_yesno (yesno.c:71)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273== 
+==23273== 
+==23273== 11 bytes in 1 blocks are still reachable in loss record 4 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x8068E64: dlg_strclone (util.c:1740)
+==23273==    by 0x805FE72: same_cache2 (inputstr.c:212)
+==23273==    by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8067711: real_auto_size (util.c:1101)
+==23273==    by 0x8067A1F: dlg_auto_size (util.c:1167)
+==23273==    by 0x806A14E: dialog_yesno (yesno.c:72)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 12 bytes in 1 blocks are still reachable in loss record 5 of 62
+==23273==    at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273==    by 0x807F18F: _nc_add_to_try (add_tries.c:90)
+==23273==    by 0x80885C6: _nc_init_keytry (init_keytry.c:74)
+==23273==    by 0x80807F4: _nc_keypad (lib_options.c:262)
+==23273==    by 0x808035F: keypad (lib_options.c:129)
+==23273==    by 0x8066340: init_dialog (util.c:330)
+==23273==    by 0x804C880: main (dialog.c:1604)
+==23273== 
+==23273== 
+==23273== 16 bytes in 1 blocks are still reachable in loss record 6 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x41165D0: tsearch (tsearch.c:281)
+==23273==    by 0x805FC92: make_cache (inputstr.c:149)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8066FD3: dlg_print_scrolled (util.c:886)
+==23273==    by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 16 bytes in 1 blocks are still reachable in loss record 7 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x41165D0: tsearch (tsearch.c:281)
+==23273==    by 0x805FC92: make_cache (inputstr.c:149)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FECD: dlg_index_wchars (inputstr.c:341)
+==23273==    by 0x8059BBE: print_button (buttons.c:97)
+==23273==    by 0x805A265: dlg_draw_buttons (buttons.c:297)
+==23273==    by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 16 bytes in 1 blocks are still reachable in loss record 8 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x41165D0: tsearch (tsearch.c:281)
+==23273==    by 0x805FC92: make_cache (inputstr.c:149)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
+==23273==    by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 16 bytes in 1 blocks are still reachable in loss record 9 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x41165D0: tsearch (tsearch.c:281)
+==23273==    by 0x805FC92: make_cache (inputstr.c:149)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8067711: real_auto_size (util.c:1101)
+==23273==    by 0x8067A1F: dlg_auto_size (util.c:1167)
+==23273==    by 0x806A14E: dialog_yesno (yesno.c:72)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273== 
+==23273== 
+==23273== 16 bytes in 1 blocks are still reachable in loss record 10 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x807F2D5: _nc_doalloc (doalloc.c:55)
+==23273==    by 0x8086167: _nc_trace_alloc (trace_buf.c:55)
+==23273==    by 0x8086261: _nc_trace_buf (trace_buf.c:90)
+==23273==    by 0x80864A7: _nc_visbuf2n (visbuf.c:94)
+==23273==    by 0x8086538: _nc_visbuf2 (visbuf.c:114)
+==23273==    by 0x8086553: _nc_visbuf (visbuf.c:120)
+==23273==    by 0x8088693: recur_tries (trace_tries.c:55)
+==23273==    by 0x80886D7: recur_tries (trace_tries.c:59)
+==23273==    by 0x80886D7: recur_tries (trace_tries.c:59)
+==23273== 
+==23273== 
+==23273== 21 bytes in 1 blocks are still reachable in loss record 11 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x40BE45F: strdup (strdup.c:43)
+==23273==    by 0x8081EE0: setupterm (lib_setup.c:471)
+==23273==    by 0x8072292: newterm (lib_newterm.c:115)
+==23273==    by 0x806E82C: initscr (lib_initscr.c:83)
+==23273==    by 0x8066211: init_dialog (util.c:292)
+==23273==    by 0x804C880: main (dialog.c:1604)
+==23273== 
+==23273== 
+==23273== 23 bytes in 1 blocks are still reachable in loss record 12 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x8088526: _nc_home_terminfo (home_terminfo.c:57)
+==23273==    by 0x8085E1B: _nc_read_entry (read_entry.c:492)
+==23273==    by 0x8081834: grab_entry (lib_setup.c:255)
+==23273==    by 0x8081D46: setupterm (lib_setup.c:438)
+==23273==    by 0x8072292: newterm (lib_newterm.c:115)
+==23273==    by 0x806E82C: initscr (lib_initscr.c:83)
+==23273==    by 0x8066211: init_dialog (util.c:292)
+==23273==    by 0x804C880: main (dialog.c:1604)
+==23273== 
+==23273== 
+==23273== 24 bytes in 1 blocks are still reachable in loss record 13 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273==    by 0x805FEE7: dlg_index_wchars (inputstr.c:342)
+==23273==    by 0x8059BBE: print_button (buttons.c:97)
+==23273==    by 0x805A265: dlg_draw_buttons (buttons.c:297)
+==23273==    by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 24 bytes in 1 blocks are still reachable in loss record 14 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273==    by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
+==23273==    by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 28 bytes in 1 blocks are still reachable in loss record 15 of 62
+==23273==    at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273==    by 0x805FC0F: make_cache (inputstr.c:139)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8066FD3: dlg_print_scrolled (util.c:886)
+==23273==    by 0x806A30C: dialog_yesno (yesno.c:104)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 28 bytes in 1 blocks are still reachable in loss record 16 of 62
+==23273==    at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273==    by 0x805FC0F: make_cache (inputstr.c:139)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FECD: dlg_index_wchars (inputstr.c:341)
+==23273==    by 0x8059BBE: print_button (buttons.c:97)
+==23273==    by 0x805A265: dlg_draw_buttons (buttons.c:297)
+==23273==    by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 28 bytes in 1 blocks are still reachable in loss record 17 of 62
+==23273==    at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273==    by 0x805FC0F: make_cache (inputstr.c:139)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x805A1F3: dlg_draw_buttons (buttons.c:296)
+==23273==    by 0x806A2D0: dialog_yesno (yesno.c:98)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 28 bytes in 1 blocks are still reachable in loss record 18 of 62
+==23273==    at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273==    by 0x805FC0F: make_cache (inputstr.c:139)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8067711: real_auto_size (util.c:1101)
+==23273==    by 0x8067A1F: dlg_auto_size (util.c:1167)
+==23273==    by 0x806A14E: dialog_yesno (yesno.c:72)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 28 bytes in 2 blocks are still reachable in loss record 19 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273==    by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8059E3A: dlg_button_sizes (buttons.c:179)
+==23273==    by 0x8059F04: dlg_button_x_step (buttons.c:209)
+==23273==    by 0x805A02F: dlg_button_layout (buttons.c:234)
+==23273==    by 0x806A11F: dialog_yesno (yesno.c:71)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 32 bytes in 2 blocks are still reachable in loss record 20 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x41165D0: tsearch (tsearch.c:281)
+==23273==    by 0x805FC92: make_cache (inputstr.c:149)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8059E3A: dlg_button_sizes (buttons.c:179)
+==23273==    by 0x8059F04: dlg_button_x_step (buttons.c:209)
+==23273==    by 0x805A02F: dlg_button_layout (buttons.c:234)
+==23273==    by 0x806A11F: dialog_yesno (yesno.c:71)
+==23273== 
+==23273== 
+==23273== 33 bytes in 1 blocks are still reachable in loss record 21 of 62
+==23273==    at 0x4023E8C: realloc (vg_replace_malloc.c:429)
+==23273==    by 0x807F2A9: _nc_doalloc (doalloc.c:50)
+==23273==    by 0x808620A: _nc_trace_alloc (trace_buf.c:63)
+==23273==    by 0x8086261: _nc_trace_buf (trace_buf.c:90)
+==23273==    by 0x80864A7: _nc_visbuf2n (visbuf.c:94)
+==23273==    by 0x8086538: _nc_visbuf2 (visbuf.c:114)
+==23273==    by 0x8086553: _nc_visbuf (visbuf.c:120)
+==23273==    by 0x8088693: recur_tries (trace_tries.c:55)
+==23273==    by 0x80886D7: recur_tries (trace_tries.c:59)
+==23273==    by 0x80886D7: recur_tries (trace_tries.c:59)
+==23273== 
+==23273== 
+==23273== 44 bytes in 1 blocks are still reachable in loss record 22 of 62
+==23273==    at 0x4023D6E: malloc (vg_replace_malloc.c:207)
+==23273==    by 0x805FDE1: same_cache2 (inputstr.c:201)
+==23273==    by 0x805FFCE: dlg_index_columns (inputstr.c:397)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8067711: real_auto_size (util.c:1101)
+==23273==    by 0x8067A1F: dlg_auto_size (util.c:1167)
+==23273==    by 0x806A14E: dialog_yesno (yesno.c:72)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273==    by 0x804CC56: main (dialog.c:1679)
+==23273== 
+==23273== 
+==23273== 47 bytes in 1 blocks are still reachable in loss record 23 of 62
+==23273==    at 0x4023E8C: realloc (vg_replace_malloc.c:429)
+==23273==    by 0x807F2A9: _nc_doalloc (doalloc.c:50)
+==23273==    by 0x8085368: read_termtype (read_entry.c:283)
+==23273==    by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
+==23273==    by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
+==23273==    by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
+==23273==    by 0x8085E90: _nc_read_entry (read_entry.c:500)
+==23273==    by 0x8081834: grab_entry (lib_setup.c:255)
+==23273==    by 0x8081D46: setupterm (lib_setup.c:438)
+==23273==    by 0x8072292: newterm (lib_newterm.c:115)
+==23273== 
+==23273== 
+==23273== 55 bytes in 1 blocks are still reachable in loss record 24 of 62
+==23273==    at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273==    by 0x8084EC3: read_termtype (read_entry.c:207)
+==23273==    by 0x8085B64: _nc_read_file_entry (read_entry.c:392)
+==23273==    by 0x8085BF5: _nc_read_tic_entry (read_entry.c:413)
+==23273==    by 0x8085C8A: _nc_read_terminfo_dirs (read_entry.c:438)
+==23273==    by 0x8085E90: _nc_read_entry (read_entry.c:500)
+==23273==    by 0x8081834: grab_entry (lib_setup.c:255)
+==23273==    by 0x8081D46: setupterm (lib_setup.c:438)
+==23273==    by 0x8072292: newterm (lib_newterm.c:115)
+==23273==    by 0x806E82C: initscr (lib_initscr.c:83)
+==23273== 
+==23273== 
+==23273== 56 bytes in 2 blocks are still reachable in loss record 25 of 62
+==23273==    at 0x4021E22: calloc (vg_replace_malloc.c:397)
+==23273==    by 0x805FC0F: make_cache (inputstr.c:139)
+==23273==    by 0x805FCF7: load_cache (inputstr.c:161)
+==23273==    by 0x805FFB4: dlg_index_columns (inputstr.c:396)
+==23273==    by 0x8060166: dlg_count_columns (inputstr.c:473)
+==23273==    by 0x8059E3A: dlg_button_sizes (buttons.c:179)
+==23273==    by 0x8059F04: dlg_button_x_step (buttons.c:209)
+==23273==    by 0x805A02F: dlg_button_layout (buttons.c:234)
+==23273==    by 0x806A11F: dialog_yesno (yesno.c:71)
+==23273==    by 0x804A728: call_yesno (dialog.c:600)
+==23273== 
+==23273== 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301291600.r0TG0h5c059371>