mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-09 12:54:23 +01:00
Require Libgcrypt 1.6
* agent/pksign.c (do_encode_dsa): Remove Libgcrypt version check -- Now that we have decided on a release plan for Libgcrypt 1.6 and given all the improvements it makes more sense to make use of these improvements than to clutter the GnuPG code with workarounds for older Libgcrypt versions.
This commit is contained in:
parent
abd922e79b
commit
b27161cd0c
@ -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 */
|
||||
{
|
||||
/* Create the S-expression. */
|
||||
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 */
|
||||
if (!err)
|
||||
*r_hash = hash;
|
||||
return err;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user