1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

A couple of fixes. gpg2's key generation does now work.

This commit is contained in:
Werner Koch 2006-06-30 09:42:08 +00:00
parent 6c4ae71b5d
commit 6c208fea32
12 changed files with 62 additions and 35 deletions

View file

@ -297,7 +297,6 @@ checksum_mpi (gcry_mpi_t a)
u16 csum;
byte *buffer;
unsigned int nbytes;
unsigned int nbits;
if ( gcry_mpi_print (GCRYMPI_FMT_PGP, NULL, 0, &nbytes, a) )
BUG ();
@ -308,9 +307,7 @@ checksum_mpi (gcry_mpi_t a)
gcry_xmalloc_secure (nbytes) : gcry_xmalloc (nbytes));
if ( gcry_mpi_print (GCRYMPI_FMT_PGP, buffer, nbytes, NULL, a) )
BUG ();
nbits = gcry_mpi_get_nbits (a);
csum = checksum_u16 (nbits);
csum += checksum (buffer, nbytes);
csum = checksum (buffer, nbytes);
xfree (buffer);
return csum;
}