Commit 3ebe7d1b authored by Niels Möller's avatar Niels Möller

* Reordered includes in most or all .c-files. All should now include

config.h.

Rev: src/nettle/ChangeLog:1.195
Rev: src/nettle/aes-decrypt-table.c:1.4
Rev: src/nettle/aes-decrypt.c:1.5
Rev: src/nettle/aes-encrypt-table.c:1.4
Rev: src/nettle/aes-encrypt.c:1.5
Rev: src/nettle/aes-meta.c:1.3
Rev: src/nettle/aes-set-decrypt-key.c:1.2
Rev: src/nettle/aes-set-encrypt-key.c:1.2
Rev: src/nettle/aes.c:1.12
Rev: src/nettle/aesdata.c:1.2
Rev: src/nettle/arcfour-meta.c:1.2
Rev: src/nettle/arcfour.c:1.3
Rev: src/nettle/base16-decode.c:1.2
Rev: src/nettle/base16-encode.c:1.2
Rev: src/nettle/base16-meta.c:1.3
Rev: src/nettle/base64-decode.c:1.5
Rev: src/nettle/base64-encode.c:1.3
Rev: src/nettle/base64-meta.c:1.4
Rev: src/nettle/bignum-random.c:1.3
Rev: src/nettle/bignum.c:1.7
Rev: src/nettle/blowfish.c:1.4
Rev: src/nettle/buffer-init.c:1.3
Rev: src/nettle/buffer.c:1.8
Rev: src/nettle/cast128-meta.c:1.3
Rev: src/nettle/cast128.c:1.4
Rev: src/nettle/cbc.c:1.6
Rev: src/nettle/des-compat.c:1.10
Rev: src/nettle/des.c:1.7
Rev: src/nettle/des3.c:1.2
Rev: src/nettle/dsa-keygen.c:1.6
Rev: src/nettle/dsa-sign.c:1.7
Rev: src/nettle/dsa-verify.c:1.4
Rev: src/nettle/dsa.c:1.5
Rev: src/nettle/examples/io.c:1.4
Rev: src/nettle/examples/nettle-benchmark.c:1.8
Rev: src/nettle/examples/nettle-openssl.c:1.2
Rev: src/nettle/examples/rsa-keygen.c:1.10
Rev: src/nettle/examples/rsa-sign.c:1.5
Rev: src/nettle/examples/rsa-verify.c:1.4
Rev: src/nettle/hmac-md5.c:1.5
Rev: src/nettle/hmac-sha1.c:1.2
Rev: src/nettle/hmac-sha256.c:1.2
Rev: src/nettle/hmac.c:1.4
Rev: src/nettle/knuth-lfib.c:1.2
Rev: src/nettle/md5-compat.c:1.3
Rev: src/nettle/md5-meta.c:1.2
Rev: src/nettle/md5.c:1.6
Rev: src/nettle/memxor.c:1.2
Rev: src/nettle/nettle-internal.c:1.3
Rev: src/nettle/pgp-encode.c:1.4
Rev: src/nettle/pkcs1-rsa-md5.c:1.2
Rev: src/nettle/pkcs1-rsa-sha1.c:1.2
Rev: src/nettle/pkcs1.c:1.2
Rev: src/nettle/realloc.c:1.3
Rev: src/nettle/rsa-compat.c:1.8
Rev: src/nettle/rsa-decrypt.c:1.4
Rev: src/nettle/rsa-encrypt.c:1.5
Rev: src/nettle/rsa-keygen.c:1.5
Rev: src/nettle/rsa-md5-sign.c:1.2
Rev: src/nettle/rsa-md5-verify.c:1.2
Rev: src/nettle/rsa-sha1-sign.c:1.2
Rev: src/nettle/rsa-sha1-verify.c:1.2
Rev: src/nettle/rsa-sign.c:1.3
Rev: src/nettle/rsa-verify.c:1.2
Rev: src/nettle/rsa.c:1.12
Rev: src/nettle/rsa2openpgp.c:1.2
Rev: src/nettle/rsa2sexp.c:1.7
Rev: src/nettle/serpent-meta.c:1.2
Rev: src/nettle/serpent.c:1.4
Rev: src/nettle/sexp-format.c:1.9
Rev: src/nettle/sexp-transport-format.c:1.2
Rev: src/nettle/sexp-transport.c:1.4
Rev: src/nettle/sexp.c:1.14
Rev: src/nettle/sexp2bignum.c:1.5
Rev: src/nettle/sexp2dsa.c:1.4
Rev: src/nettle/sexp2rsa.c:1.11
Rev: src/nettle/sha1-meta.c:1.2
Rev: src/nettle/sha1.c:1.8
Rev: src/nettle/sha256-meta.c:1.2
Rev: src/nettle/sha256.c:1.3
Rev: src/nettle/tools/input.c:1.2
Rev: src/nettle/tools/misc.c:1.2
Rev: src/nettle/tools/output.c:1.3
Rev: src/nettle/tools/parse.c:1.2
Rev: src/nettle/tools/sexp-conv.c:1.14
Rev: src/nettle/twofish-meta.c:1.2
Rev: src/nettle/twofish.c:1.6
Rev: src/nettle/yarrow256.c:1.17
Rev: src/nettle/yarrow_key_event.c:1.4
parent 1b154507
2003-05-12 Niels Mller <nisse@cuckoo.hack.org>
* Reordered includes in most or all .c-files. All should now
include config.h.
2003-05-12 Niels Mller <niels@s3.kth.se> 2003-05-12 Niels Mller <niels@s3.kth.se>
* configure.ac: Use LSH_FUNC_ALLOCA. * configure.ac: Use LSH_FUNC_ALLOCA.
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "aes-internal.h" #include "aes-internal.h"
const struct aes_table const struct aes_table
......
...@@ -23,10 +23,14 @@ ...@@ -23,10 +23,14 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#include "aes-internal.h" #if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include "aes-internal.h"
void void
aes_decrypt(struct aes_ctx *ctx, aes_decrypt(struct aes_ctx *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "aes-internal.h" #include "aes-internal.h"
/* Tables are assembled using little-endian byte order, including the /* Tables are assembled using little-endian byte order, including the
......
...@@ -23,10 +23,14 @@ ...@@ -23,10 +23,14 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#include "aes-internal.h" #if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include "aes-internal.h"
/* On my sparc, encryption is significantly slower than decryption, /* On my sparc, encryption is significantly slower than decryption,
* even though the *only* difference is which table is passed to _aes_crypt. * even though the *only* difference is which table is passed to _aes_crypt.
* *
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "nettle-meta.h" #include "nettle-meta.h"
#include "aes.h" #include "aes.h"
......
...@@ -25,9 +25,13 @@ ...@@ -25,9 +25,13 @@
/* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */ /* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "aes-internal.h" #include "aes-internal.h"
/* Tables for comoutations in the AES GF2 field. */ /* Tables for computations in the AES GF2 field. */
static const uint8_t log[0x100] = static const uint8_t log[0x100] =
{ {
0x00,0x00,0x19,0x01,0x32,0x02,0x1a,0xc6, 0x00,0x00,0x19,0x01,0x32,0x02,0x1a,0xc6,
......
...@@ -25,10 +25,14 @@ ...@@ -25,10 +25,14 @@
/* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */ /* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */
#include "aes-internal.h" #if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include "aes-internal.h"
/* Tables for comoutations in the AES GF2 field. */ /* Tables for comoutations in the AES GF2 field. */
static const uint8_t log[0x100] = static const uint8_t log[0x100] =
{ {
......
...@@ -25,12 +25,16 @@ ...@@ -25,12 +25,16 @@
/* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */ /* Originally written by Rafael R. Sevilla <dido@pacific.net.ph> */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h>
#include "aes-internal.h" #include "aes-internal.h"
#include "macros.h" #include "macros.h"
#include <assert.h>
#ifndef AES_DEBUG #ifndef AES_DEBUG
# define AES_DEBUG 0 # define AES_DEBUG 0
#endif #endif
......
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -38,7 +42,7 @@ xtime(unsigned x) ...@@ -38,7 +42,7 @@ xtime(unsigned x)
return x; return x;
} }
/* Computes the expoenntiatiom and logarithm tables for GF_2, to the /* Computes the exponentiatiom and logarithm tables for GF_2, to the
* base x+1 (0x03). The unit element is 1 (0x01).*/ * base x+1 (0x03). The unit element is 1 (0x01).*/
static void static void
compute_log(void) compute_log(void)
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "nettle-meta.h" #include "nettle-meta.h"
#include "arcfour.h" #include "arcfour.h"
......
...@@ -23,10 +23,14 @@ ...@@ -23,10 +23,14 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#include "arcfour.h" #if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include "arcfour.h"
#define SWAP(a,b) do { int _t = a; a = b; b = _t; } while(0) #define SWAP(a,b) do { int _t = a; a = b; b = _t; } while(0)
void void
......
...@@ -23,11 +23,15 @@ ...@@ -23,11 +23,15 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#include "base16.h" #if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include "base16.h"
void void
base16_decode_init(struct base16_decode_ctx *ctx) base16_decode_init(struct base16_decode_ctx *ctx)
{ {
......
...@@ -23,6 +23,10 @@ ...@@ -23,6 +23,10 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "base16.h" #include "base16.h"
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "nettle-meta.h" #include "nettle-meta.h"
#include "base16.h" #include "base16.h"
......
...@@ -22,11 +22,15 @@ ...@@ -22,11 +22,15 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#include "base64.h" #if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include "base64.h"
#define TABLE_INVALID -1 #define TABLE_INVALID -1
#define TABLE_SPACE -2 #define TABLE_SPACE -2
#define TABLE_END -3 #define TABLE_END -3
......
...@@ -22,11 +22,14 @@ ...@@ -22,11 +22,14 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#include "base64.h" #if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include "base64.h"
static const uint8_t encode_table[64] = static const uint8_t encode_table[64] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "nettle-meta.h" #include "nettle-meta.h"
#include "base64.h" #include "base64.h"
......
...@@ -24,15 +24,15 @@ ...@@ -24,15 +24,15 @@
*/ */
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
#include "config.h" # include "config.h"
#endif #endif
#if HAVE_LIBGMP #if HAVE_LIBGMP
#include "bignum.h"
#include <stdlib.h> #include <stdlib.h>
#include "bignum.h"
void void
nettle_mpz_random_size(mpz_t x, nettle_mpz_random_size(mpz_t x,
void *ctx, nettle_random_func random, void *ctx, nettle_random_func random,
......
...@@ -24,16 +24,16 @@ ...@@ -24,16 +24,16 @@
*/ */
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
#include "config.h" # include "config.h"
#endif #endif
#if HAVE_LIBGMP #if HAVE_LIBGMP
#include "bignum.h"
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include "bignum.h"
/* Two's complement negation means that -x = ~x + 1, ~x = -(x+1), /* Two's complement negation means that -x = ~x + 1, ~x = -(x+1),
* and we use that x = ~~x = ~(-x-1). * and we use that x = ~~x = ~(-x-1).
* *
......
...@@ -31,12 +31,16 @@ ...@@ -31,12 +31,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h>
#include "blowfish.h" #include "blowfish.h"
#include "macros.h" #include "macros.h"
#include <assert.h>
/* Initial keysetup state */ /* Initial keysetup state */
static const struct blowfish_ctx static const struct blowfish_ctx
initial_ctx = initial_ctx =
......
...@@ -22,11 +22,15 @@ ...@@ -22,11 +22,15 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#include "buffer.h" #if HAVE_CONFIG_H
#include "realloc.h" # include "config.h"
#endif
#include <stdlib.h> #include <stdlib.h>
#include "buffer.h"
#include "realloc.h"
/* This is in a separate file so that we don't link in realloc in /* This is in a separate file so that we don't link in realloc in
* programs that don't need it. */ * programs that don't need it. */
......
...@@ -23,12 +23,16 @@ ...@@ -23,12 +23,16 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#include "buffer.h" #if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "buffer.h"
int int
nettle_buffer_grow(struct nettle_buffer *buffer, nettle_buffer_grow(struct nettle_buffer *buffer,
unsigned length) unsigned length)
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "nettle-meta.h" #include "nettle-meta.h"
#include "cast128.h" #include "cast128.h"
......
...@@ -29,13 +29,17 @@ ...@@ -29,13 +29,17 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h>
#include "cast128.h" #include "cast128.h"
#include "cast128_sboxes.h" #include "cast128_sboxes.h"
#include "macros.h" #include "macros.h"
#include <assert.h>
#define CAST_SMALL_KEY 10 #define CAST_SMALL_KEY 10
#define CAST_SMALL_ROUNDS 12 #define CAST_SMALL_ROUNDS 12
#define CAST_FULL_ROUNDS 16 #define CAST_FULL_ROUNDS 16
......
...@@ -23,14 +23,18 @@ ...@@ -23,14 +23,18 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#include "cbc.h" #if HAVE_CONFIG_H
# include <config.h>
#include "memxor.h" #endif
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "cbc.h"
#include "memxor.h"
void void
cbc_encrypt(void *ctx, void (*f)(void *ctx, cbc_encrypt(void *ctx, void (*f)(void *ctx,
unsigned length, uint8_t *dst, unsigned length, uint8_t *dst,
......
...@@ -23,15 +23,19 @@ ...@@ -23,15 +23,19 @@
* MA 02111-1307, USA. * MA 02111-1307, USA.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include <string.h>
#include <assert.h>
#include "des-compat.h" #include "des-compat.h"
#include "cbc.h" #include "cbc.h"
#include "macros.h" #include "macros.h"
#include "memxor.h" #include "memxor.h"
#include <string.h>
#include <assert.h>
struct des_compat_des3 { struct des_ctx *keys[3]; }; struct des_compat_des3 { struct des_ctx *keys[3]; };
typedef void (*cbc_crypt_func)(void *, uint32_t, uint8_t *, const uint8_t *); typedef void (*cbc_crypt_func)(void *, uint32_t, uint8_t *, const uint8_t *);
......
...@@ -30,12 +30,16 @@ ...@@ -30,12 +30,16 @@
* Please see the file `descore.README' for the complete copyright notice. * Please see the file `descore.README' for the complete copyright notice.
*/ */
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h>
#include "des.h" #include "des.h"
#include "desCode.h" #include "desCode.h"
#include <assert.h>
static ENCRYPT(DesSmallFipsEncrypt,TEMPSMALL, LOADFIPS,KEYMAPSMALL,SAVEFIPS)