aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--agent/pksign.c31
-rw-r--r--configure.ac2
2 files changed, 6 insertions, 27 deletions
diff --git a/agent/pksign.c b/agent/pksign.c
index ad783ce1b..9c7341a7f 100644
--- a/agent/pksign.c
+++ b/agent/pksign.c
@@ -197,32 +197,11 @@ do_encode_dsa (const byte *md, size_t mdlen, int dsaalgo, gcry_sexp_t pkey,
if (mdlen > qbits/8)
mdlen = qbits/8;
- /* Create the S-expression. If we are using Libgcrypt 1.6 we make
- use of Deterministic DSA. Libgcrypt < 1.6 does not implement
- RFC-6979 and also requires us to convert to an MPI because it
- expects an unsigned integer. Using %b directly is not possible
- because Libgcrypt assumes an MPI and uses GCRYMPI_FMT_STD for
- parsing and thus possible yielding a negative value. */
-#if GCRYPT_VERSION_NUMBER >= 0x010600 /* Libgcrypt >= 1.6 */
- {
- err = gcry_sexp_build (&hash, NULL,
- "(data (flags rfc6979) (hash %s %b))",
- rfc6979_hash_algo_string (mdlen),
- (int)mdlen, md);
- }
-#else /* Libgcrypt < 1.6 */
- {
- gcry_mpi_t mpi;
-
- err = gcry_mpi_scan (&mpi, GCRYMPI_FMT_USG, md, mdlen, NULL);
- if (!err)
- {
- err = gcry_sexp_build (&hash, NULL,
- "(data (flags raw) (value %m))", mpi);
- gcry_mpi_release (mpi);
- }
- }
-#endif /* Libgcrypt < 1.6 */
+ /* Create the S-expression. */
+ err = gcry_sexp_build (&hash, NULL,
+ "(data (flags rfc6979) (hash %s %b))",
+ rfc6979_hash_algo_string (mdlen),
+ (int)mdlen, md);
if (!err)
*r_hash = hash;
return err;
diff --git a/configure.ac b/configure.ac
index 5a5e9f42d..e20a70c0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,7 +46,7 @@ AC_INIT([gnupg],[mym4_full_version], [http://bugs.gnupg.org])
NEED_GPG_ERROR_VERSION=1.11
NEED_LIBGCRYPT_API=1
-NEED_LIBGCRYPT_VERSION=1.5.0
+NEED_LIBGCRYPT_VERSION=1.6.0
NEED_LIBASSUAN_API=2
NEED_LIBASSUAN_VERSION=2.1.0