diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-09-16 02:59:40 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-09-16 10:00:15 +0000 |
commit | 689ff93474c61984adcf5ad0bd3230e77dd83545 (patch) | |
tree | c199595929f1814d4fb7fe0c5c21351a6dc255c1 /epan/dissectors/packet-ssl-utils.c | |
parent | 47650d357e3115e89b854f195b385855c4703a21 (diff) | |
download | wireshark-689ff93474c61984adcf5ad0bd3230e77dd83545.tar.gz |
Squelch some compiler warnings.
gcry_cipher_get_algo_keylen() returns a size_t, which is bigger than a
guint on most if not all 64-bit platforms; however, if the key is bigger
than 2^32 bytes, we have bigger problems, so just cast it down.
Change-Id: Ia7c97d2742686daf2e42f634c6e349cb580fa9df
Reviewed-on: https://code.wireshark.org/review/17731
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ssl-utils.c')
-rw-r--r-- | epan/dissectors/packet-ssl-utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index f27851171b..51efa98a95 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -2275,7 +2275,7 @@ ssl_get_cipher_blocksize(const SslCipherSuite *cipher_suite) gint cipher_algo; if (cipher_suite->mode != MODE_CBC) return 0; cipher_algo = ssl_get_cipher_by_name(ciphers[cipher_suite->enc - 0x30]); - return gcry_cipher_get_algo_blklen(cipher_algo); + return (guint)gcry_cipher_get_algo_blklen(cipher_algo); } static guint @@ -3114,11 +3114,11 @@ ssl_generate_keyring_material(SslDecryptSession*ssl_session) encr_key_len = ssl_get_cipher_export_keymat_size(cipher_suite->number); is_export_cipher = encr_key_len > 0; if (!is_export_cipher && cipher_suite->enc != ENC_NULL) { - encr_key_len = gcry_cipher_get_algo_keylen(cipher_algo); + encr_key_len = (guint)gcry_cipher_get_algo_keylen(cipher_algo); } if (cipher_suite->mode == MODE_CBC) { - write_iv_len = gcry_cipher_get_algo_blklen(cipher_algo); + write_iv_len = (guint)gcry_cipher_get_algo_blklen(cipher_algo); } else if (cipher_suite->mode == MODE_GCM || cipher_suite->mode == MODE_CCM || cipher_suite->mode == MODE_CCM_8) { /* account for a four-byte salt for client and server side (from * client_write_IV and server_write_IV), see GCMNonce (RFC 5288) */ |