diff options
author | Werner Koch <wk@gnupg.org> | 2011-02-02 17:40:32 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2011-02-02 17:40:32 +0100 |
commit | 20f429f735d6e965e0660484f8286fe24fb6162b (patch) | |
tree | 8908aa1b86c2be5a83ca4e1883da86234b931a3b /g10/pkglue.h | |
parent | Sample ECC keys and message do now work. (diff) | |
download | gnupg2-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 '')
-rw-r--r-- | g10/pkglue.h | 7 |
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); |