aboutsummaryrefslogtreecommitdiffstats
path: root/sm/certdump.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-01-19 09:33:03 +0000
committerWerner Koch <[email protected]>2021-01-19 09:33:03 +0000
commit9500432b7ae10d98b30c58de4357e2ffb93bf795 (patch)
tree63ebc784ad1b417a75df15ccda1d2b335add61c9 /sm/certdump.c
parenttools: Add option --clock to watchgnupg (diff)
downloadgnupg-9500432b7ae10d98b30c58de4357e2ffb93bf795.tar.gz
gnupg-9500432b7ae10d98b30c58de4357e2ffb93bf795.zip
Require Libgcrypt 1.9
* configure.ac: Require at least Libgcrypt 1.9.0. Remove all GCRYPT_VERSION_NUMBER dependent code. -- Only Libgcrypt 1.9 implements EAX which is a mandatory algorithm in RFC4880bis. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'sm/certdump.c')
-rw-r--r--sm/certdump.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/sm/certdump.c b/sm/certdump.c
index fec2412fd..5c9f8a96b 100644
--- a/sm/certdump.c
+++ b/sm/certdump.c
@@ -103,11 +103,7 @@ gpgsm_print_serial_decimal (estream_t fp, ksba_const_sexp_t sn)
unsigned long n, i;
char *endp;
gcry_mpi_t a, r, ten;
-#if GCRYPT_VERSION_NUMBER >= 0x010900 /* >= 1.9.0 */
unsigned int dd;
-#else
- unsigned char numbuf[10];
-#endif
if (!p)
es_fputs (_("none"), fp);
@@ -134,15 +130,8 @@ gpgsm_print_serial_decimal (estream_t fp, ksba_const_sexp_t sn)
do
{
gcry_mpi_div (a, r, a, ten, 0);
-#if GCRYPT_VERSION_NUMBER >= 0x010900 /* >= 1.9.0 */
gcry_mpi_get_ui (&dd, r);
put_membuf_printf (&mb, "%u", dd);
-#else
- *numbuf = 0; /* Need to clear because USB format prints
- * an empty string for a value of 0. */
- gcry_mpi_print (GCRYMPI_FMT_USG, numbuf, 10, NULL, r);
- put_membuf_printf (&mb, "%u", (unsigned int)*numbuf);
-#endif
}
while (gcry_mpi_cmp_ui (a, 0));