[git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-217-ge0ae31f
by Jussi Kivilinna
cvs at cvs.gnupg.org
Thu Sep 5 09:38:07 CEST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU crypto library".
The branch, master has been updated
via e0ae31fcce3bd57b24751ff3c82cba820e493c3a (commit)
via 50ec983666f0ca9d50c84aa1afad0d7bd5810779 (commit)
from 1d23040b659661b4086c079cb9fd5f37189a7020 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e0ae31fcce3bd57b24751ff3c82cba820e493c3a
Author: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Date: Thu Sep 5 09:34:25 2013 +0300
Change _gcry_burn_stack take burn depth as unsigned integer
* src/misc.c (_gcry_burn_stack): Change to handle 'unsigned int' bytes.
--
Unsigned integer is better here for code generation because we can now avoid
possible branching caused by (bytes <= 0) check.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
diff --git a/src/g10lib.h b/src/g10lib.h
index 2d84dd3..4c34ae5 100644
--- a/src/g10lib.h
+++ b/src/g10lib.h
@@ -242,7 +242,7 @@ int strcasecmp (const char *a, const char *b) _GCRY_GCC_ATTR_PURE;
/* Stack burning. */
-void _gcry_burn_stack (int bytes);
+void _gcry_burn_stack (unsigned int bytes);
/* To avoid that a compiler optimizes certain memset calls away, these
diff --git a/src/misc.c b/src/misc.c
index 135aeb4..dece1d0 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -288,10 +288,11 @@ _gcry_log_printhex (const char *text, const void *buffer, size_t length)
void
-_gcry_burn_stack (int bytes)
+_gcry_burn_stack (unsigned int bytes)
{
#ifdef HAVE_VLA
- int buflen = (((bytes <= 0) ? 1 : bytes) + 63) & ~63;
+ /* (bytes == 0 ? 1 : bytes) == (!bytes + bytes) */
+ unsigned int buflen = ((!bytes + bytes) + 63) & ~63;
volatile char buf[buflen];
wipememory (buf, sizeof buf);
@@ -300,9 +301,8 @@ _gcry_burn_stack (int bytes)
wipememory (buf, sizeof buf);
- bytes -= sizeof buf;
- if (bytes > 0)
- _gcry_burn_stack (bytes);
+ if (bytes > sizeof buf)
+ _gcry_burn_stack (bytes - sizeof buf);
#endif
}
commit 50ec983666f0ca9d50c84aa1afad0d7bd5810779
Author: Jussi Kivilinna <jussi.kivilinna at iki.fi>
Date: Thu Sep 5 09:46:29 2013 +0300
mpicalc: fix building on linux and win32
* src/Makefile.am (mpicalc): Adjust CFLAGS and LDADD.
--
Building libgcrypt is now failing on Ubuntu 13.04 machine. Patch changes src/Makefile.am for 'mpicalc' to correct this issue.
$ make distclean; ./configure --enable-maintainer-mode; make
...
libtool: link: gcc -g -O2 -fvisibility=hidden -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wextra -Wbad-function-cast -Wwrite-strings -Wdeclaration-after-statement -Wno-missing-field-initializers -Wno-sign-compare -Wpointer-arith -o .libs/mpicalc mpicalc-mpicalc.o ../src/.libs/libgcrypt.so
/usr/bin/ld: mpicalc-mpicalc.o: undefined reference to symbol 'gpg_strerror'
/usr/bin/ld: note: 'gpg_strerror' is defined in DSO /lib/x86_64-linux-gnu/libgpg-error.so.0 so try adding it to the linker command line
/lib/x86_64-linux-gnu/libgpg-error.so.0: could not read symbols: Invalid operation
With win32 target, gpg-error.h is not found.
$ make distclean; ./autogen.sh --build-w32; make
...
i686-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -Wcast-align -Wshadow -Wstrict-prototypes -Wformat -Wno-format-y2k -Wformat-security -W -Wextra -Wbad-function-cast -Wwrite-strings -Wdeclaration-after-statement -Wno-missing-field-initializers -Wno-sign-compare -Wpointer-arith -MT mpicalc-mpicalc.o -MD -MP -MF .deps/mpicalc-mpicalc.Tpo -c -o mpicalc-mpicalc.o `test -f 'mpicalc.c' || echo './'`mpicalc.c
In file included from mpicalc.c:36:0:
gcrypt.h:32:23: fatal error: gpg-error.h: No such file or directory
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
diff --git a/src/Makefile.am b/src/Makefile.am
index 507fcd0..3bc27c8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -129,8 +129,8 @@ dumpsexp_CFLAGS = $(arch_gpg_error_cflags)
dumpsexp_LDADD = $(arch_gpg_error_libs)
mpicalc_SOURCES = mpicalc.c
-mpicalc_CFLAGS = $(arch_gpg_error_cflags)
-mpicalc_LDADD = ../src/libgcrypt.la $(arch_gpg_error_libs)
+mpicalc_CFLAGS = $(GPG_ERROR_CFLAGS)
+mpicalc_LDADD = libgcrypt.la $(GPG_ERROR_LIBS)
hmac256_SOURCES = hmac256.c
hmac256_CFLAGS = -DSTANDALONE $(arch_gpg_error_cflags)
-----------------------------------------------------------------------
Summary of changes:
src/Makefile.am | 4 ++--
src/g10lib.h | 2 +-
src/misc.c | 10 +++++-----
3 files changed, 8 insertions(+), 8 deletions(-)
hooks/post-receive
--
The GNU crypto library
http://git.gnupg.org
More information about the Gnupg-commits
mailing list