summaryrefslogtreecommitdiffstats
path: root/g10/pkglue.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-02-02 17:40:32 +0100
committerWerner Koch <wk@gnupg.org>2011-02-02 17:40:32 +0100
commit20f429f735d6e965e0660484f8286fe24fb6162b (patch)
tree8908aa1b86c2be5a83ca4e1883da86234b931a3b /g10/pkglue.h
parentSample ECC keys and message do now work. (diff)
downloadgnupg2-20f429f735d6e965e0660484f8286fe24fb6162b.tar.xz
gnupg2-20f429f735d6e965e0660484f8286fe24fb6162b.zip
Compute the fingerprint for ECDH only on demand.
This also fixes a failed assertion when using a v3 key where the fingerprint size is not 20.
Diffstat (limited to 'g10/pkglue.h')
-rw-r--r--g10/pkglue.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/g10/pkglue.h b/g10/pkglue.h
index eb0d7c1dc..e5165f73b 100644
--- a/g10/pkglue.h
+++ b/g10/pkglue.h
@@ -20,14 +20,15 @@
#ifndef GNUPG_G10_PKGLUE_H
#define GNUPG_G10_PKGLUE_H
+#include "packet.h" /* For PKT_public_key. */
+
/*-- pkglue.c --*/
gcry_mpi_t mpi_from_sexp (gcry_sexp_t sexp, const char * item);
int pk_verify (int algo, gcry_mpi_t hash, gcry_mpi_t *data,
gcry_mpi_t *pkey);
int pk_encrypt (int algo, gcry_mpi_t *resarr, gcry_mpi_t data,
- const byte fp[MAX_FINGERPRINT_LEN],
- gcry_mpi_t *pkey);
+ PKT_public_key *pk, gcry_mpi_t *pkey);
int pk_check_secret_key (int algo, gcry_mpi_t *skey);
@@ -35,7 +36,7 @@ int pk_check_secret_key (int algo, gcry_mpi_t *skey);
gcry_mpi_t pk_ecdh_default_params (unsigned int qbits);
gpg_error_t pk_ecdh_generate_ephemeral_key (gcry_mpi_t *pkey, gcry_mpi_t *r_k);
gpg_error_t pk_ecdh_encrypt_with_shared_point
-/* */ (int is_encrypt, gcry_mpi_t shared_mpi,
+/* */ (int is_encrypt, gcry_mpi_t shared_mpi,
const byte pk_fp[MAX_FINGERPRINT_LEN],
gcry_mpi_t data, gcry_mpi_t *pkey,
gcry_mpi_t *out);