aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2002-09-11 07:27:54 +0000
committerWerner Koch <[email protected]>2002-09-11 07:27:54 +0000
commitc5445cc3239e7654fbaf145c6e697de54093892f (patch)
treefb8e0b6e5018951bd13aade5f46b3444d2fe005c /g10/keygen.c
parent* exec.c (expand_args): Remove loop left over from earlier implementation. (diff)
downloadgnupg-c5445cc3239e7654fbaf145c6e697de54093892f.tar.gz
gnupg-c5445cc3239e7654fbaf145c6e697de54093892f.zip
* g10.c, options.h: Removed option --emulate-checksum-bug.
* misc.c (checksum_u16_nobug): Removed. (checksum_u16): Removed the bug emulation. (checksum_mpi): Ditto. (checksum_mpi_counted_nbits): Removed and replaced all calls with checksum_mpi. * parse-packet.c (read_protected_v3_mpi): New. (parse_key): Use it here to store it as an opaque MPI. * seckey-cert.c (do_check): Changed the v3 unprotection to the new why to store these keys. (protect_secret_key): Likewise. * build-packet.c (do_secret_key): And changed the writing.
Diffstat (limited to '')
-rw-r--r--g10/keygen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index b8398b88a..b45618e90 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -690,7 +690,7 @@ gen_elg(int algo, unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
sk->is_protected = 0;
sk->protect.algo = 0;
- sk->csum = checksum_mpi_counted_nbits( sk->skey[3] );
+ sk->csum = checksum_mpi( sk->skey[3] );
if( ret_sk ) /* not a subkey: return an unprotected version of the sk */
*ret_sk = copy_secret_key( NULL, sk );
@@ -776,7 +776,7 @@ gen_dsa(unsigned int nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
sk->is_protected = 0;
sk->protect.algo = 0;
- sk->csum = checksum_mpi_counted_nbits( sk->skey[4] );
+ sk->csum = checksum_mpi ( sk->skey[4] );
if( ret_sk ) /* not a subkey: return an unprotected version of the sk */
*ret_sk = copy_secret_key( NULL, sk );
@@ -866,10 +866,10 @@ gen_rsa(int algo, unsigned nbits, KBNODE pub_root, KBNODE sec_root, DEK *dek,
sk->is_protected = 0;
sk->protect.algo = 0;
- sk->csum = checksum_mpi_counted_nbits( sk->skey[2] );
- sk->csum += checksum_mpi_counted_nbits( sk->skey[3] );
- sk->csum += checksum_mpi_counted_nbits( sk->skey[4] );
- sk->csum += checksum_mpi_counted_nbits( sk->skey[5] );
+ sk->csum = checksum_mpi (sk->skey[2] );
+ sk->csum += checksum_mpi (sk->skey[3] );
+ sk->csum += checksum_mpi (sk->skey[4] );
+ sk->csum += checksum_mpi (sk->skey[5] );
if( ret_sk ) /* not a subkey: return an unprotected version of the sk */
*ret_sk = copy_secret_key( NULL, sk );