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:
parent
6c4ae71b5d
commit
6c208fea32
12 changed files with 62 additions and 35 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue