From f72d53348e818f8629927d76bd00ec56ba72c0b1 Mon Sep 17 00:00:00 2001 From: cameronrich Date: Thu, 1 Nov 2007 21:33:18 +0000 Subject: [PATCH] minor updates git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@139 9a5d90b5-6617-0410-8a86-bb477d3ed2e3 --- Makefile | 2 ++ crypto/md2.c | 24 ++++++++++++------------ ssl/bigint.c | 8 ++++++++ ssl/bigint.h | 3 --- ssl/bigint_impl.h | 5 ----- 5 files changed, 22 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 4771e6f1c..b63c1c2fa 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,9 @@ win32_demo: install: $(PREFIX) all cp --no-dereference $(STAGE)/libax* $(PREFIX)/lib chmod 755 $(PREFIX)/lib/libax* +ifdef CONFIG_SAMPLES install -m 755 $(STAGE)/ax* $(PREFIX)/bin +endif ifdef CONFIG_HTTP_HAS_AUTHORIZATION install -m 755 $(STAGE)/htpasswd $(PREFIX)/bin endif diff --git a/crypto/md2.c b/crypto/md2.c index 93e1bf645..5234c4fb8 100644 --- a/crypto/md2.c +++ b/crypto/md2.c @@ -1,23 +1,23 @@ /* - * RFC 1115/1319 compliant MD2 implementation + * Copyright(C) 2006 Cameron Rich * - * Copyright (C) 2006-2007 Christophe Devine - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License, version 2.1 as published by the Free Software Foundation. + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + /* + * RFC 1115/1319 compliant MD2 implementation * The MD2 algorithm was designed by Ron Rivest in 1989. * * http://www.ietf.org/rfc/rfc1115.txt diff --git a/ssl/bigint.c b/ssl/bigint.c index ef4a917f4..4b778a515 100644 --- a/ssl/bigint.c +++ b/ssl/bigint.c @@ -55,6 +55,11 @@ #include #include "bigint.h" +#define V1 v->comps[v->size-1] /**< v1 for division */ +#define V2 v->comps[v->size-2] /**< v2 for division */ +#define U(j) tmp_u->comps[tmp_u->size-j-1] /**< uj for division */ +#define Q(j) quotient->comps[quotient->size-j-1] /**< qj for division */ + static bigint *bi_int_multiply(BI_CTX *ctx, bigint *bi, comp i); static bigint *bi_int_divide(BI_CTX *ctx, bigint *biR, comp denom); static bigint *alloc(BI_CTX *ctx, int size); @@ -68,8 +73,11 @@ static bigint *comp_left_shift(bigint *biR, int num_shifts); #ifdef CONFIG_BIGINT_CHECK_ON static void check(const bigint *bi); +#else +#define check(A) /**< disappears in normal production mode */ #endif + /** * @brief Start a new bigint context. * @return A bigint context. diff --git a/ssl/bigint.h b/ssl/bigint.h index 8c248a930..b96721d60 100644 --- a/ssl/bigint.h +++ b/ssl/bigint.h @@ -23,9 +23,6 @@ #include "os_port.h" #include "bigint_impl.h" -#ifndef CONFIG_BIGINT_CHECK_ON -#define check(A) /**< disappears in normal production mode */ -#endif BI_CTX *bi_initialize(void); void bi_terminate(BI_CTX *ctx); void bi_permanent(bigint *bi); diff --git a/ssl/bigint_impl.h b/ssl/bigint_impl.h index 762a7ccbb..3db467cc0 100644 --- a/ssl/bigint_impl.h +++ b/ssl/bigint_impl.h @@ -97,9 +97,4 @@ typedef struct /**< A big integer "session" context. */ #define PERMANENT 0x7FFF55AA /**< A magic number for permanents. */ -#define V1 v->comps[v->size-1] /**< v1 for division */ -#define V2 v->comps[v->size-2] /**< v2 for division */ -#define U(j) tmp_u->comps[tmp_u->size-j-1] /**< uj for division */ -#define Q(j) quotient->comps[quotient->size-j-1] /**< qj for division */ - #endif