aboutsummaryrefslogtreecommitdiffstats
path: root/g10/export.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2011-03-08 11:23:59 +0000
committerWerner Koch <[email protected]>2011-03-08 11:23:59 +0000
commit327af90594204db9683fcee5c8c6b8098c8da37a (patch)
tree1ef036bbadb924c19d24c3b75a299c3efa012f95 /g10/export.c
parentAdded option --inquire to PRESET_PASSPHRASE. Note that the inquired passphras... (diff)
downloadgnupg-327af90594204db9683fcee5c8c6b8098c8da37a.tar.gz
gnupg-327af90594204db9683fcee5c8c6b8098c8da37a.zip
Require libgcrypt 1.5
Without Libgcrypt 1.5 is was not possible to use ECC keys. ECC is major new feature and thus it does not make sense to allow building with an older Libgcrypt without supporting ECC. Also fixed a few missing prototypes.
Diffstat (limited to 'g10/export.c')
-rw-r--r--g10/export.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/g10/export.c b/g10/export.c
index 47185e301..191f68b8b 100644
--- a/g10/export.c
+++ b/g10/export.c
@@ -581,11 +581,7 @@ transfer_format_to_openpgp (gcry_sexp_t s_pgp, PKT_public_key *pk)
skey[0], skey[1], skey[2], skey[3], skey[4]);
if (err)
goto leave;
-#ifdef HAVE_GCRY_PK_GET_CURVE
curvename = gcry_pk_get_curve (s_pubkey, 0, NULL);
-#else
- curvename = "?";
-#endif
gcry_sexp_release (s_pubkey);
curveoidstr = gpg_curve_to_oid (curvename, NULL);
if (!curveoidstr)
@@ -649,17 +645,10 @@ transfer_format_to_openpgp (gcry_sexp_t s_pgp, PKT_public_key *pk)
if (err)
goto leave;
- /* Check that the public key parameters match. Since Libgcrypt 1.5
- and the gcry_pk_get_curve function, gcry_mpi_cmp handles opaque
- MPI correctly and thus we don't need to to do the extra
- opaqueness checks. */
+ /* Check that the public key parameters match. Note that since
+ Libgcrypt 1.5 gcry_mpi_cmp handles opaque MPI correctly. */
for (idx=0; idx < npkey; idx++)
- if (0
-#ifndef HAVE_GCRY_PK_GET_CURVE
- || gcry_mpi_get_flag (pk->pkey[idx], GCRYMPI_FLAG_OPAQUE)
- || gcry_mpi_get_flag (skey[idx], GCRYMPI_FLAG_OPAQUE)
-#endif
- || gcry_mpi_cmp (pk->pkey[idx], skey[idx]))
+ if (gcry_mpi_cmp (pk->pkey[idx], skey[idx]))
{
err = gpg_error (GPG_ERR_BAD_PUBKEY);
goto leave;