diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2021-03-24 06:51:42 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2021-03-24 06:51:42 +0100 |
commit | 90a5b4e648b3c8a6fe645df7e61654dfdb3548be (patch) | |
tree | a65af8e22cd850bbe98976a943f8539704955250 /g10/pkglue.c | |
parent | gpgconf: Fix listing of default_pubkey_algo. (diff) | |
download | gnupg2-90a5b4e648b3c8a6fe645df7e61654dfdb3548be.tar.xz gnupg2-90a5b4e648b3c8a6fe645df7e61654dfdb3548be.zip |
gpg: Support ECDH with v5 key.
* g10/ecdh.c (build_kdf_params): Use the first 20 octets.
* g10/pkglue.c (pk_encrypt): Remove length check to 20.
* g10/pubkey-enc.c (get_it): Likewise.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10/pkglue.c')
-rw-r--r-- | g10/pkglue.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/g10/pkglue.c b/g10/pkglue.c index 13f8e2f03..cab007f01 100644 --- a/g10/pkglue.c +++ b/g10/pkglue.c @@ -419,7 +419,6 @@ pk_encrypt (pubkey_algo_t algo, gcry_mpi_t *resarr, gcry_mpi_t data, { gcry_mpi_t public, result; byte fp[MAX_FINGERPRINT_LEN]; - size_t fpn; byte *shared; size_t nshared; @@ -436,9 +435,7 @@ pk_encrypt (pubkey_algo_t algo, gcry_mpi_t *resarr, gcry_mpi_t data, } result = NULL; - fingerprint_from_pk (pk, fp, &fpn); - if (fpn != 20) - rc = gpg_error (GPG_ERR_INV_LENGTH); + fingerprint_from_pk (pk, fp, NULL); if (!rc) { |