diff options
author | Simon Josefsson <simon@josefsson.org> | 2006-05-11 16:34:05 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2006-05-11 16:34:05 +0000 |
commit | 2bf4f7156e4f1da082656ddd2de7825cef5ed64a (patch) | |
tree | e3dcdb11673d869bf7b5765d8bca20a2f7d020a6 /gl | |
parent | 32beb645b79b96c0368535c7332fd48cb34073f4 (diff) | |
download | gnutls-2bf4f7156e4f1da082656ddd2de7825cef5ed64a.tar.gz |
Update.
Diffstat (limited to 'gl')
-rw-r--r-- | gl/Makefile.am | 4 | ||||
-rw-r--r-- | gl/des.c | 12 | ||||
-rw-r--r-- | gl/m4/gnulib-cache.m4 | 3 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 3 | ||||
-rw-r--r-- | gl/md4.c | 10 | ||||
-rw-r--r-- | gl/sha1.c | 10 | ||||
-rw-r--r-- | gl/stdint_.h | 2 |
7 files changed, 23 insertions, 21 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am index de1d790d59..6a70ba2286 100644 --- a/gl/Makefile.am +++ b/gl/Makefile.am @@ -1,10 +1,10 @@ ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004-2006 Free Software Foundation, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program -# that contains a configuration script generated by Automake, under +# that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. @@ -1,5 +1,5 @@ /* des.c --- DES and Triple-DES encryption/decryption Algorithm - * Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005 + * Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2005, 2006 * Free Software Foundation, Inc. * * This file is free software; you can redistribute it and/or modify @@ -447,7 +447,7 @@ des_is_weak_key (const char * key) static void des_key_schedule (const char * _rawkey, uint32_t * subkey) { - const unsigned char *rawkey = _rawkey; + const unsigned char *rawkey = (const unsigned char *) _rawkey; uint32_t left, right, work; int round; @@ -559,8 +559,8 @@ des_makekey (des_ctx *ctx, const char * key, size_t keylen) void des_ecb_crypt (des_ctx *ctx, const char * _from, char * _to, int mode) { - const unsigned char *from = _from; - unsigned char *to = _to; + const unsigned char *from = (const unsigned char *) _from; + unsigned char *to = (unsigned char *) _to; uint32_t left, right, work; uint32_t *keys; @@ -632,8 +632,8 @@ tripledes_ecb_crypt (tripledes_ctx *ctx, const char * _from, char * _to, int mode) { - const unsigned char *from = _from; - unsigned char *to = _to; + const unsigned char *from = (const unsigned char *) _from; + unsigned char *to = (unsigned char *) _to; uint32_t left, right, work; uint32_t *keys; diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 04820a8e01..cdb9c30809 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 @@ -1,4 +1,5 @@ -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004-2006 Free Software Foundation, Inc. +# # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index da7238be35..61da4d7c2a 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -1,4 +1,5 @@ -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004-2006 Free Software Foundation, Inc. +# # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program @@ -1,6 +1,6 @@ /* Functions to compute MD4 message digest of files or memory blocks. according to the definition of MD4 in RFC 1320 from April 1992. - Copyright (C) 1995,1996,1997,1999,2000,2001,2002,2003,2005 + Copyright (C) 1995,1996,1997,1999,2000,2001,2002,2003,2005,2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -179,7 +179,7 @@ process_partial_block:; return 0; } -/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The +/* Compute MD4 message digest for LEN bytes beginning at BUFFER. The result is always in little endian byte order, so that a byte-wise output yields to the wanted ASCII representation of the message digest. */ @@ -273,14 +273,14 @@ md4_process_bytes (const void *buffer, size_t len, struct md4_ctx *ctx) /* --- Code below is the primary difference between md5.c and md4.c --- */ /* MD4 round constants */ -#define K1 0x5a827999L -#define K2 0x6ed9eba1L +#define K1 0x5a827999 +#define K2 0x6ed9eba1 /* Round functions. */ #define F(x, y, z) ((z) ^ ((x) & ((y) ^ (z)))) #define G(x, y, z) (((x) & (y)) | ((x) & (z)) | ((y) & (z))) #define H(x, y, z) ((x) ^ (y) ^ (z)) -#define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) +#define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n)))) #define R1(a,b,c,d,k,s) a=rol(a+F(b,c,d)+x[k],s); #define R2(a,b,c,d,k,s) a=rol(a+G(b,c,d)+x[k]+K1,s); #define R3(a,b,c,d,k,s) a=rol(a+H(b,c,d)+x[k]+K2,s); @@ -270,10 +270,10 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) /* --- Code below is the primary difference between md5.c and sha1.c --- */ /* SHA1 round constants */ -#define K1 0x5a827999L -#define K2 0x6ed9eba1L -#define K3 0x8f1bbcdcL -#define K4 0xca62c1d6L +#define K1 0x5a827999 +#define K2 0x6ed9eba1 +#define K3 0x8f1bbcdc +#define K4 0xca62c1d6 /* Round functions. Note that F2 is the same as F4. */ #define F1(B,C,D) ( D ^ ( B & ( C ^ D ) ) ) @@ -305,7 +305,7 @@ sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx) if (ctx->total[0] < len) ++ctx->total[1]; -#define rol(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +#define rol(x, n) (((x) << (n)) | ((uint32_t) (x) >> (32 - (n)))) #define M(I) ( tm = x[I&0x0f] ^ x[(I-14)&0x0f] \ ^ x[(I-8)&0x0f] ^ x[(I-3)&0x0f] \ diff --git a/gl/stdint_.h b/gl/stdint_.h index 8f6254134f..40be110e35 100644 --- a/gl/stdint_.h +++ b/gl/stdint_.h @@ -21,7 +21,7 @@ /* * ISO C 99 <stdint.h> for platforms that lack it. - * <http://www.opengroup.org/onlinepubs/007904975/basedefs/stdint.h.html> + * <http://www.opengroup.org/susv3xbd/stdint.h.html> */ /* Get wchar_t, WCHAR_MIN, WCHAR_MAX. */ |