Browse Source

Fixed elgamal key transerable key output - key size was not computed in that case

master
Edouard Tisserant 7 years ago
parent
commit
fed3b718dc
3 changed files with 13 additions and 3 deletions
  1. +1
    -1
      dist/configure.ac
  2. +10
    -0
      dist/src/lib/create.c
  3. +2
    -2
      dist/src/lib/version.h

+ 1
- 1
dist/configure.ac View File

@ -2,7 +2,7 @@
#
# Process this file with autoconf to produce a configure script.
AC_INIT([netpgp],[20140220],[Alistair Crooks <agc@netbsd.org> c0596823])
AC_INIT([netpgp],[beta0],[ pEp NetPGP Team <netpgp@pep-project.org> ])
AC_PREREQ(2.69)
AC_REVISION([$Revision$])


+ 10
- 0
dist/src/lib/create.c View File

@ -176,6 +176,11 @@ pubkey_length(const pgp_pubkey_t *key)
case PGP_PKA_RSA:
return mpi_length(key->key.rsa.n) + mpi_length(key->key.rsa.e);
case PGP_PKA_ELGAMAL:
return mpi_length(key->key.elgamal.p) +
mpi_length(key->key.elgamal.g) +
mpi_length(key->key.elgamal.y);
default:
(void) fprintf(stderr,
"pubkey_length: unknown key algorithm\n");
@ -197,6 +202,11 @@ seckey_length(const pgp_seckey_t *key)
mpi_length(key->key.rsa.q) + mpi_length(key->key.rsa.u);
return (unsigned)(len + pubkey_length(&key->pubkey));
case PGP_PKA_ELGAMAL:
return (unsigned)(
mpi_length(key->key.dsa.x) + pubkey_length(&key->pubkey));
default:
(void) fprintf(stderr,
"seckey_length: unknown key algorithm\n");


+ 2
- 2
dist/src/lib/version.h View File

@ -58,9 +58,9 @@
#endif
/* development versions have .99 suffix */
#define NETPGP_BASE_VERSION "3.99.17"
#define NETPGP_BASE_VERSION "3.99.99"
#define NETPGP_VERSION_CAT(a, b) "NetPGP portable " a "/[" b "]"
#define NETPGP_VERSION_CAT(a, b) "NetPGP for pEp " a "/[" b "]"
#define NETPGP_VERSION_STRING \
NETPGP_VERSION_CAT(NETPGP_BASE_VERSION, NETPGP_AUTOCONF_VERSION)


Loading…
Cancel
Save