diff --git a/g10/ChangeLog b/g10/ChangeLog index cdacc6fdb..df424a3a6 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,5 +1,10 @@ 2011-03-03 Werner Koch + * keyid.c (hash_public_key): Remove shadowing NBITS. + + * misc.c (pubkey_nbits): Replace GCRY_PK_ by PUBKEY_ALGO_. + (get_signature_count): Remove warning. + * armor.c (armor_filter): Don't take a copy of radbuf while writing the checksum. This works around a faulty gcc 4.4 warning. diff --git a/g10/keyid.c b/g10/keyid.c index cbcc971c3..d08cceeb2 100644 --- a/g10/keyid.c +++ b/g10/keyid.c @@ -99,7 +99,6 @@ hash_public_key (gcry_md_hd_t md, PKT_public_key *pk) { if (gcry_mpi_get_flag (pk->pkey[i], GCRYMPI_FLAG_OPAQUE)) { - size_t nbits; const void *p; p = gcry_mpi_get_opaque (pk->pkey[i], &nbits); diff --git a/g10/misc.c b/g10/misc.c index f2ab98408..e0c57a145 100644 --- a/g10/misc.c +++ b/g10/misc.c @@ -569,7 +569,8 @@ get_signature_count (PKT_public_key *pk) { #ifdef ENABLE_CARD_SUPPORT struct agent_card_info_s info; -#warning fixme: We should check that the correct card has been inserted + + (void)pk; if (!agent_scd_getattr ("SIG-COUNTER",&info)) return info.sig_counter; else @@ -1453,20 +1454,17 @@ pubkey_nbits( int algo, gcry_mpi_t *key ) int rc, nbits; gcry_sexp_t sexp; -#warning FIXME: We are mixing OpenPGP And CGrypt Ids - assert( algo != GCRY_PK_ECDSA && algo != GCRY_PK_ECDH ); - - if( algo == GCRY_PK_DSA ) { + if( algo == PUBKEY_ALGO_DSA ) { rc = gcry_sexp_build ( &sexp, NULL, "(public-key(dsa(p%m)(q%m)(g%m)(y%m)))", key[0], key[1], key[2], key[3] ); } - else if( algo == GCRY_PK_ELG || algo == GCRY_PK_ELG_E ) { + else if( algo == PUBKEY_ALGO_ELGAMAL || algo == PUBKEY_ALGO_ELGAMAL_E ) { rc = gcry_sexp_build ( &sexp, NULL, "(public-key(elg(p%m)(g%m)(y%m)))", key[0], key[1], key[2] ); } - else if( algo == GCRY_PK_RSA ) { + else if( is_RSA (algo) ) { rc = gcry_sexp_build ( &sexp, NULL, "(public-key(rsa(n%m)(e%m)))", key[0], key[1] );