aboutsummaryrefslogtreecommitdiffstats
path: root/g10
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
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')
-rw-r--r--g10/call-dirmngr.h2
-rw-r--r--g10/export.c17
-rw-r--r--g10/import.c5
3 files changed, 6 insertions, 18 deletions
diff --git a/g10/call-dirmngr.h b/g10/call-dirmngr.h
index 43636eab4..933303dbf 100644
--- a/g10/call-dirmngr.h
+++ b/g10/call-dirmngr.h
@@ -25,6 +25,8 @@ gpg_error_t gpg_dirmngr_ks_search (ctrl_t ctrl, const char *searchstr,
gpg_error_t (*cb)(void*, char *),
void *cb_value);
gpg_error_t gpg_dirmngr_ks_get (ctrl_t ctrl, char *pattern[], estream_t *r_fp);
+gpg_error_t gpg_dirmngr_ks_fetch (ctrl_t ctrl,
+ const char *url, estream_t *r_fp);
gpg_error_t gpg_dirmngr_ks_put (ctrl_t ctrl, void *data, size_t datalen,
kbnode_t keyblock);
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;
diff --git a/g10/import.c b/g10/import.c
index 99398c762..39968ff6f 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -1253,11 +1253,8 @@ transfer_secret_keys (ctrl_t ctrl, struct stats_s *stats, kbnode_t sec_keyblock)
err = gpg_error_from_syserror ();
else
{
-#ifdef HAVE_GCRY_PK_GET_CURVE /* Also ensures availability of get_param. */
gcry_sexp_t cparam = gcry_pk_get_param (GCRY_PK_ECDSA, curve);
-#else
- gcry_sexp_t cparam = NULL;
-#endif
+
xfree (curve);
if (!cparam)
err = gpg_error (GPG_ERR_UNKNOWN_CURVE);