summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--THANKS4
-rw-r--r--cipher/ChangeLog8
-rw-r--r--cipher/crc.c1
-rw-r--r--cipher/md4.c1
-rw-r--r--cipher/md5.c1
-rw-r--r--cipher/rmd160.c1
-rw-r--r--cipher/rsa.c24
-rw-r--r--cipher/sha1.c1
-rw-r--r--cipher/sha256.c1
-rw-r--r--cipher/tiger.c1
-rw-r--r--cipher/whirlpool.c1
-rw-r--r--mpi/ChangeLog4
-rw-r--r--mpi/mpicoder.c4
-rw-r--r--mpi/mpiutil.c1
-rw-r--r--src/ChangeLog10
-rw-r--r--src/ath.h20
-rw-r--r--src/mpi.h3
-rw-r--r--src/sexp.c1
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/fipsdrv.c6
20 files changed, 68 insertions, 30 deletions
diff --git a/THANKS b/THANKS
index f34974d3..cf99a6d0 100644
--- a/THANKS
+++ b/THANKS
@@ -21,6 +21,7 @@ Christian Grothoff grothoff@cs.purdue.edu
Christian von Roques roques@pond.sub.org
Christopher Oliver oliver@fritz.traverse.net
Christian Recktenwald chris@citecs.de
+Dan Fandrich dan at coneharvesters com
Daniel Eisenbud eisenbud@cs.swarthmore.edu
Daniel Koening dan@mail.isis.de
David Ellement ellement@sdd.hp.com
@@ -148,7 +149,8 @@ Wim Vandeputte wim@kd85.com
nbecker@hns.com
- Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003,
+ 2009 Free Software Foundation, Inc.
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
diff --git a/cipher/ChangeLog b/cipher/ChangeLog
index 8924f17e..3efd490c 100644
--- a/cipher/ChangeLog
+++ b/cipher/ChangeLog
@@ -1,3 +1,11 @@
+2009-02-16 Werner Koch <wk@g10code.com>
+
+ * rsa.c (generate_x931): Do not initialize TBL with automatic
+ variables.
+ * whirlpool.c, tiger.c, sha256.c, sha1.c, rmd160.c, md5.c
+ * md4.c, crc.c: Remove memory.h. This is garbage from gnupg.
+ Reported by Dan Fandrich.
+
2009-01-22 Werner Koch <wk@g10code.com>
* ecc.c (compute_keygrip): Remove superfluous const.
diff --git a/cipher/crc.c b/cipher/crc.c
index d04fff89..9e406f1b 100644
--- a/cipher/crc.c
+++ b/cipher/crc.c
@@ -25,7 +25,6 @@
#include <string.h>
#include "g10lib.h"
-#include "memory.h"
#include "cipher.h"
#include "bithelp.h"
diff --git a/cipher/md4.c b/cipher/md4.c
index 680cf87f..a13c45c9 100644
--- a/cipher/md4.c
+++ b/cipher/md4.c
@@ -53,7 +53,6 @@
#include <string.h>
#include "g10lib.h"
-#include "memory.h"
#include "cipher.h"
#include "bithelp.h"
diff --git a/cipher/md5.c b/cipher/md5.c
index 899dce89..051fc81b 100644
--- a/cipher/md5.c
+++ b/cipher/md5.c
@@ -37,7 +37,6 @@
#include <string.h>
#include "g10lib.h"
-#include "memory.h"
#include "cipher.h"
#include "bithelp.h"
diff --git a/cipher/rmd160.c b/cipher/rmd160.c
index 7805bf53..3fdc41cc 100644
--- a/cipher/rmd160.c
+++ b/cipher/rmd160.c
@@ -24,7 +24,6 @@
#include <string.h>
#include "g10lib.h"
-#include "memory.h"
#include "rmd.h"
#include "cipher.h" /* Only used for the rmd160_hash_buffer() prototype. */
diff --git a/cipher/rsa.c b/cipher/rsa.c
index cf278c25..8ee60183 100644
--- a/cipher/rsa.c
+++ b/cipher/rsa.c
@@ -444,18 +444,28 @@ generate_x931 (RSA_secret_key *sk, unsigned int nbits, unsigned long e_value,
else
{
/* Parameters to derive the key are given. */
+ /* Note that we explicitly need to setup the values of tbl
+ because some compilers (e.g. OpenWatcom, IRIX) don't allow
+ to initialize a structure with automatic variables. */
struct { const char *name; gcry_mpi_t *value; } tbl[] = {
- { "Xp1", &xp1 },
- { "Xp2", &xp2 },
- { "Xp", &xp },
- { "Xq1", &xq1 },
- { "Xq2", &xq2 },
- { "Xq", &xq },
- { NULL, NULL }
+ { "Xp1" },
+ { "Xp2" },
+ { "Xp" },
+ { "Xq1" },
+ { "Xq2" },
+ { "Xq" },
+ { NULL }
};
int idx;
gcry_sexp_t oneparm;
+ tbl[0].value = &xp1;
+ tbl[1].value = &xp2;
+ tbl[2].value = &xp;
+ tbl[3].value = &xq1;
+ tbl[4].value = &xq2;
+ tbl[5].value = &xq;
+
for (idx=0; tbl[idx].name; idx++)
{
oneparm = gcry_sexp_find_token (deriveparms, tbl[idx].name, 0);
diff --git a/cipher/sha1.c b/cipher/sha1.c
index 8862c64b..0b5dc430 100644
--- a/cipher/sha1.c
+++ b/cipher/sha1.c
@@ -37,7 +37,6 @@
#endif
#include "g10lib.h"
-#include "memory.h"
#include "bithelp.h"
#include "cipher.h"
#include "hash-common.h"
diff --git a/cipher/sha256.c b/cipher/sha256.c
index 5d61d2fd..e0148da7 100644
--- a/cipher/sha256.c
+++ b/cipher/sha256.c
@@ -41,7 +41,6 @@
#include <string.h>
#include "g10lib.h"
-#include "memory.h"
#include "bithelp.h"
#include "cipher.h"
#include "hash-common.h"
diff --git a/cipher/tiger.c b/cipher/tiger.c
index a6200457..320cdb19 100644
--- a/cipher/tiger.c
+++ b/cipher/tiger.c
@@ -24,7 +24,6 @@
#include <string.h>
#include "g10lib.h"
-#include "memory.h"
#include "cipher.h"
#ifdef HAVE_U64_TYPEDEF
diff --git a/cipher/whirlpool.c b/cipher/whirlpool.c
index 9b029ee3..e6c226c0 100644
--- a/cipher/whirlpool.c
+++ b/cipher/whirlpool.c
@@ -36,7 +36,6 @@
#include "types.h"
#include "g10lib.h"
-#include "memory.h"
#include "cipher.h"
#include "bithelp.h"
diff --git a/mpi/ChangeLog b/mpi/ChangeLog
index 2488e586..235a3692 100644
--- a/mpi/ChangeLog
+++ b/mpi/ChangeLog
@@ -1,3 +1,7 @@
+2009-02-16 Werner Koch <wk@g10code.com>
+
+ * mpiutil.c: Remove memory.h.
+
2008-12-05 Werner Koch <wk@g10code.com>
* mpicoder.c (mpi_read_from_buffer): Do not bail out if the mpi is
diff --git a/mpi/mpicoder.c b/mpi/mpicoder.c
index 8f0c76f1..4c76189e 100644
--- a/mpi/mpicoder.c
+++ b/mpi/mpicoder.c
@@ -456,6 +456,10 @@ gcry_mpi_scan (struct gcry_mpi **ret_mpi, enum gcry_mpi_format format,
const unsigned char *s = buffer;
size_t n;
+ /* This test is not strictly necessary and an assert (!len)
+ would be sufficient. We keep this test in case we later
+ allow the BUFLEN argument to act as a sanitiy check. Same
+ below. */
if (len && len < 4)
return gcry_error (GPG_ERR_TOO_SHORT);
diff --git a/mpi/mpiutil.c b/mpi/mpiutil.c
index 4dc52113..950e4ea5 100644
--- a/mpi/mpiutil.c
+++ b/mpi/mpiutil.c
@@ -25,7 +25,6 @@
#include "g10lib.h"
#include "mpi-internal.h"
-#include "memory.h"
#include "mod-source-info.h"
diff --git a/src/ChangeLog b/src/ChangeLog
index 649324d6..1b784e4d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2009-02-16 Werner Koch <wk@g10code.com>
+
+ * ath.h [HAVE_SYS_SELECT_H]: Include <sys/select.h> for fd_set.
+ [!HAVE_SYS_SELECT_H]: Include <sys/time.h>. Move inclusion of
+ config.h to the top. The actual configure check was already
+ there.
+
+ * sexp.c: Remove memory.h.
+ * mpi.h: Remove memory.h. Add string.h.
+
2009-02-02 Werner Koch <wk@g10code.com>
* ath.h: Include sys/time.h. Fixes bug#993.
diff --git a/src/ath.h b/src/ath.h
index 0813a4a7..be7444d8 100644
--- a/src/ath.h
+++ b/src/ath.h
@@ -21,17 +21,21 @@
#ifndef ATH_H
#define ATH_H
+#include <config.h>
+
#ifdef _WIN32
-#include <windows.h>
-#else
-#include <sys/types.h>
-#include <sys/socket.h>
-#endif
+# include <windows.h>
+#else /* !_WIN32 */
+# ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
+# else
+# include <sys/time.h>
+# endif
+# include <sys/types.h>
+# include <sys/socket.h>
+#endif /* !_WIN32 */
#include <gpg-error.h>
-#include <sys/time.h> /* Required by Interix. */
-
-#include <config.h>
/* Define _ATH_EXT_SYM_PREFIX if you want to give all external symbols
diff --git a/src/mpi.h b/src/mpi.h
index f630c3f6..eaac7389 100644
--- a/src/mpi.h
+++ b/src/mpi.h
@@ -30,8 +30,9 @@
#include <config.h>
#include <stdio.h>
+#include <string.h>
+
#include "types.h"
-#include "memory.h"
#include "../mpi/mpi-asm-defs.h"
#include "g10lib.h"
diff --git a/src/sexp.c b/src/sexp.c
index 59a4e7ed..81500b1a 100644
--- a/src/sexp.c
+++ b/src/sexp.c
@@ -30,7 +30,6 @@
#define GCRYPT_NO_MPI_MACROS 1
#include "g10lib.h"
-#include "memory.h"
typedef struct gcry_sexp *NODE;
typedef unsigned short DATALEN;
diff --git a/tests/ChangeLog b/tests/ChangeLog
index bce3e8d7..4ff10a87 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-16 Werner Koch <wk@g10code.com>
+
+ * fipsdrv.c (print_buffer): Remove parens from initializer for
+ better portability. Reported by Dan Fandrich.
+
2009-02-13 Werner Koch <wk@g10code.com>
* rsacvt.c (compute_missing): Fix dqm1 computation. Take care of
diff --git a/tests/fipsdrv.c b/tests/fipsdrv.c
index f80e30c8..29ceedde 100644
--- a/tests/fipsdrv.c
+++ b/tests/fipsdrv.c
@@ -797,9 +797,9 @@ print_buffer (const void *buffer, size_t length)
if (base64_output)
{
static const unsigned char bintoasc[64+1] =
- ("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
- "abcdefghijklmnopqrstuvwxyz"
- "0123456789+/");
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "abcdefghijklmnopqrstuvwxyz"
+ "0123456789+/";
const unsigned char *p;
unsigned char inbuf[4];
char outbuf[4];