diff --git a/test/suite_decryption.py b/test/suite_decryption.py index 50692ea5ba..113096584a 100644 --- a/test/suite_decryption.py +++ b/test/suite_decryption.py @@ -208,9 +208,11 @@ class case_decrypt_tls(subprocesstest.SubprocessTestCase): if not features.have_gnutls: self.skipTest('Requires GnuTLS.') key_file = os.path.join(dirs.key_dir, 'rsasnakeoil2.key') + # Test protocol alias while at it (ssl -> tls) self.assertRun((cmd_tshark, '-r', capture_file('tls-renegotiation.pcap'), '-o', 'tls.keys_list:0.0.0.0,4433,http,{}'.format(key_file), + '-d', 'tcp.port==4433,ssl', '-Tfields', '-e', 'http.content_length', '-Y', 'http', diff --git a/ui/decode_as_utils.c b/ui/decode_as_utils.c index 30ca1096e1..32c8347bd5 100644 --- a/ui/decode_as_utils.c +++ b/ui/decode_as_utils.c @@ -118,7 +118,7 @@ fprint_all_protocols_for_layer_types(FILE *output, gchar *table_name) * to pass parameters and store results */ struct protocol_name_search{ - gchar *searched_name; /* Protocol filter name we are looking for */ + const char *searched_name; /* Protocol filter name we are looking for */ dissector_handle_t matched_handle; /* Handle for a dissector whose protocol has the specified filter name */ guint nb_match; /* How many dissectors matched searched_name */ }; @@ -387,8 +387,14 @@ gboolean decode_as_command_option(const gchar *cl_param) cmdarg_err("No protocol name specified"); /* Note, we don't exit here, but dissector_matching will remain NULL, so we exit below */ } else { + header_field_info *hfi = proto_registrar_get_byalias(dissector_str); + user_protocol_name.nb_match = 0; - user_protocol_name.searched_name = dissector_str; + if (hfi) { + user_protocol_name.searched_name = hfi->abbrev; + } else { + user_protocol_name.searched_name = dissector_str; + } user_protocol_name.matched_handle = NULL; dissector_table_foreach_handle(table_name, find_protocol_name_func, &user_protocol_name); /* Go and perform the search for this dissector in the this table's dissectors' names and shortnames */