diff options
author | Werner Koch <[email protected]> | 2006-11-21 11:00:14 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2006-11-21 11:00:14 +0000 |
commit | e50c5f39cc2ea399eead30ef451d7d5e24c13fe6 (patch) | |
tree | 37f73eb8abf85a3a6505a5a7c30b1e4c8e8d85d5 /g10/seskey.c | |
parent | Made some PIN pads work. (diff) | |
download | gnupg-e50c5f39cc2ea399eead30ef451d7d5e24c13fe6.tar.gz gnupg-e50c5f39cc2ea399eead30ef451d7d5e24c13fe6.zip |
No more warnings for AMD64 (at least when cross-compiling). Thus tehre is a
good chance that gpg2 will now work.
Other cleanups.
Updated gettext.
Diffstat (limited to 'g10/seskey.c')
-rw-r--r-- | g10/seskey.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/g10/seskey.c b/g10/seskey.c index c0efc3ae7..6ac83b01f 100644 --- a/g10/seskey.c +++ b/g10/seskey.c @@ -77,7 +77,7 @@ make_session_key( DEK *dek ) gcry_mpi_t encode_session_key (DEK *dek, unsigned int nbits) { - int nframe = (nbits+7) / 8; + size_t nframe = (nbits+7) / 8; byte *p; byte *frame; int i,n; @@ -157,7 +157,7 @@ static gcry_mpi_t do_encode_md( gcry_md_hd_t md, int algo, size_t len, unsigned nbits, const byte *asn, size_t asnlen ) { - int nframe = (nbits+7) / 8; + size_t nframe = (nbits+7) / 8; byte *frame; int i,n; gcry_mpi_t a; @@ -237,11 +237,11 @@ encode_md_value (PKT_public_key *pk, PKT_secret_key *sk, or something like that, which would look correct but allow trivial forgeries. Yes, I know this rules out using MD5 with DSA. ;) */ - - if(qbytes<160) + if (qbytes < 160) { - log_error(_("DSA key %s uses an unsafe (%u bit) hash\n"), - pk?keystr_from_pk(pk):keystr_from_sk(sk),qbytes); + log_error (_("DSA key %s uses an unsafe (%u bit) hash\n"), + pk?keystr_from_pk(pk):keystr_from_sk(sk), + (unsigned int)qbytes); return NULL; } @@ -249,11 +249,11 @@ encode_md_value (PKT_public_key *pk, PKT_secret_key *sk, /* Check if we're too short. Too long is safe as we'll automatically left-truncate. */ - - if(gcry_md_get_algo_dlen (hash_algo) < qbytes) + if (gcry_md_get_algo_dlen (hash_algo) < qbytes) { - log_error(_("DSA key %s requires a %u bit or larger hash\n"), - pk?keystr_from_pk(pk):keystr_from_sk(sk),qbytes*8); + log_error (_("DSA key %s requires a %u bit or larger hash\n"), + pk?keystr_from_pk(pk):keystr_from_sk(sk), + (unsigned int)(qbytes*8)); return NULL; } |