debian/changelog | 1 debian/control | 2 debian/patches/Add-libgcrypt-as-an-option-for-sha1.diff | 75 ++++++++++++++++ debian/patches/series | 1 4 files changed, 78 insertions(+), 1 deletion(-)
New commits: commit b0e3c01f73d178d9485a64706b7186b71e3aa178 Author: Julien Cristau <jcris...@debian.org> Date: Sun Apr 5 00:17:00 2009 +0200 Use libgcrypt for SHA1 instead of OpenSSL's libcrypto. diff --git a/debian/changelog b/debian/changelog index 839ff19..4464561 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ xorg-server (2:1.6.0-1) UNRELEASED; urgency=low * 0001-mi-force-the-paired-kbd-device-before-CopyKeyClass.patch: remove, included upstream. * Turn on ModeDebug by default. + * Use libgcrypt for SHA1 instead of OpenSSL's libcrypto. -- David Nusinow <dnusi...@debian.org> Sun, 15 Feb 2009 18:49:51 -0500 diff --git a/debian/control b/debian/control index 9c8ab13..15eb0c5 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ Build-Depends: debhelper (>= 4.0.0), lsb-release, pkg-config, bison, flex, x11proto-input-dev (>= 1.5), x11proto-dri2-dev (>= 1.99.3), libxdmcp-dev (>= 1:0.99.1), libxfont-dev, libfontenc-dev, libxkbfile-dev (>= 1:0.99.1), libpixman-1-dev (>= 0.13.2), - libpciaccess-dev, libssl-dev, + libpciaccess-dev, libgcrypt-dev, x11proto-xf86dri-dev, libdrm-dev (>= 2.4.3) [!hurd-i386], x11proto-print-dev, libfreetype6-dev, xfonts-utils, x11proto-gl-dev (>= 1.4.9), libgl1-mesa-dev (>= 7.2+git20081209.a0d5c3cf), diff --git a/debian/patches/Add-libgcrypt-as-an-option-for-sha1.diff b/debian/patches/Add-libgcrypt-as-an-option-for-sha1.diff new file mode 100644 index 0000000..c1cb9f3 --- /dev/null +++ b/debian/patches/Add-libgcrypt-as-an-option-for-sha1.diff @@ -0,0 +1,75 @@ +From 6c6bbefdcf8a41dc71f9cbeca7ce972e2661fade Mon Sep 17 00:00:00 2001 +From: Julien Cristau <jcris...@debian.org> +Date: Thu, 2 Apr 2009 02:34:49 +0200 +Subject: [PATCH] Add libgcrypt as an option for sha1 + +--- + configure.ac | 6 ++++++ + include/dix-config.h.in | 3 +++ + render/glyph.c | 12 ++++++++++++ + 3 files changed, 21 insertions(+), 0 deletions(-) + +diff --git a/configure.ac b/configure.ac +index f4e1dbb..29e3afc 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1163,6 +1163,12 @@ if test "x$SHA1_LIB" = "x" ; then + [Use libmd SHA1 functions instead of OpenSSL libcrypto])]) + fi + ++if test "x$SHA1_LIB" = "x"; then ++ AC_CHECK_LIB([gcrypt], [gcry_md_open], [SHA1_LIB="-lgcrypt" ++ AC_DEFINE([HAVE_SHA1_IN_LIBGCRYPT], [1], ++ [Use libgcrypt SHA1 functions instead of OpenSSL libcrypto])]) ++fi ++ + if test "x$SHA1_LIB" = "x" ; then + PKG_CHECK_EXISTS([OPENSSL], [openssl], [HAVE_OPENSSL_PKC=yes], + [HAVE_OPENSSL_PKC=no]) +diff --git a/include/dix-config.h.in b/include/dix-config.h.in +index 26ac223..53ce798 100644 +--- a/include/dix-config.h.in ++++ b/include/dix-config.h.in +@@ -157,6 +157,9 @@ + /* Define to use libmd SHA1 functions instead of OpenSSL libcrypto */ + #undef HAVE_SHA1_IN_LIBMD + ++/* Define to use libgcrypt SHA1 functions instead of OpenSSL libcrypto */ ++#undef HAVE_SHA1_IN_LIBGCRYPT ++ + /* Define to 1 if you have the `shmctl64' function. */ + #undef HAVE_SHMCTL64 + +diff --git a/render/glyph.c b/render/glyph.c +index 7c044aa..007d472 100644 +--- a/render/glyph.c ++++ b/render/glyph.c +@@ -28,6 +28,8 @@ + + #ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */ + # include <sha1.h> ++#elif defined(HAVE_SHA1_IN_LIBGCRYPT) ++# include <gcrypt.h> + #else /* Use OpenSSL's libcrypto */ + # include <stddef.h> /* buggy openssl/sha.h wants size_t */ + # include <openssl/sha.h> +@@ -205,6 +207,16 @@ HashGlyph (xGlyphInfo *gi, + SHA1Update (&ctx, gi, sizeof (xGlyphInfo)); + SHA1Update (&ctx, bits, size); + SHA1Final (sha1, &ctx); ++#elif defined(HAVE_SHA1_IN_LIBGCRYPT) /* Use libgcrypt for SHA1 */ ++ gcry_md_hd_t h; ++ gcry_error_t err; ++ ++ err = gcry_md_open(&h, GCRY_MD_SHA1, 0); ++ if (err) ++ return BadAlloc; ++ gcry_md_write(h, gi, sizeof (xGlyphInfo)); ++ gcry_md_write(h, bits, size); ++ memcpy(sha1, gcry_md_read(h, GCRY_MD_SHA1), 20); + #else /* Use OpenSSL's libcrypto */ + SHA_CTX ctx; + int success; +-- +1.6.2.1 + diff --git a/debian/patches/series b/debian/patches/series index ac4fe41..2781388 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ #13_debian_add_xkbpath_env_variable.diff 0001-xorg.conf-5-refer-to-mousedrv-4-.-Debian-394058.patch Turn-on-ModeDebug-by-default.patch +Add-libgcrypt-as-an-option-for-sha1.diff -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org