Paolo Abeni:
- enable the 'follow SSL stream' menu item only when a ssl packet is selected. - when 'following' an ssl stream, show ssl decrypted data only for current conversation. - fix a typo in ssl preference description. svn path=/trunk/; revision=17301
This commit is contained in:
parent
e10101b774
commit
461b6d35ee
|
@ -4317,7 +4317,7 @@ proto_register_ssl(void)
|
|||
(const char **)&ssl_ports_list);
|
||||
prefs_register_string_preference(ssl_module, "debug_file", "SSL debug file",
|
||||
"redirect ssl debug to file name; leave empty to disable debug, "
|
||||
"use %s to redirect output to stderr\n",
|
||||
"use \""SSL_DEBUG_USE_STDERR"\" to redirect output to stderr\n",
|
||||
(const char **)&ssl_debug_file_name);
|
||||
}
|
||||
|
||||
|
|
23
gtk/menu.c
23
gtk/menu.c
|
@ -1959,9 +1959,26 @@ walk_menu_tree_for_selected_packet(GList *node, frame_data *fd,
|
|||
return node_data->enabled;
|
||||
}
|
||||
|
||||
static int
|
||||
packet_is_ssl(epan_dissect_t* edt)
|
||||
{
|
||||
GPtrArray* array;
|
||||
int ssl_id, is_ssl;
|
||||
if (!edt || !edt->tree)
|
||||
return 0;
|
||||
ssl_id = proto_get_id_by_filter_name("ssl");
|
||||
if (ssl_id < 0)
|
||||
return 0;
|
||||
array = proto_find_finfo(edt->tree, ssl_id);
|
||||
is_ssl = array->len > 0;
|
||||
g_ptr_array_free(array, FALSE);
|
||||
return is_ssl;
|
||||
}
|
||||
|
||||
void
|
||||
set_menus_for_selected_packet(capture_file *cf)
|
||||
{
|
||||
int is_ssl = packet_is_ssl(cf->edt);
|
||||
set_menu_sensitivity(main_menu_factory, "/Edit/Mark Packet (toggle)",
|
||||
cf->current_frame != NULL);
|
||||
set_menu_sensitivity(packet_list_menu_factory, "/Mark Packet (toggle)",
|
||||
|
@ -1995,11 +2012,11 @@ set_menus_for_selected_packet(capture_file *cf)
|
|||
set_menu_sensitivity(tree_view_menu_factory, "/Follow TCP Stream",
|
||||
cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE);
|
||||
set_menu_sensitivity(main_menu_factory, "/Analyze/Follow SSL Stream",
|
||||
cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE);
|
||||
cf->current_frame != NULL ? is_ssl : FALSE);
|
||||
set_menu_sensitivity(packet_list_menu_factory, "/Follow SSL Stream",
|
||||
cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE);
|
||||
cf->current_frame != NULL ? is_ssl : FALSE);
|
||||
set_menu_sensitivity(tree_view_menu_factory, "/Follow SSL Stream",
|
||||
cf->current_frame != NULL ? (cf->edt->pi.ipproto == IP_PROTO_TCP) : FALSE);
|
||||
cf->current_frame != NULL ? is_ssl : FALSE);
|
||||
set_menu_sensitivity(main_menu_factory, "/Analyze/Decode As...",
|
||||
cf->current_frame != NULL && decode_as_ok());
|
||||
set_menu_sensitivity(packet_list_menu_factory, "/Decode As...",
|
||||
|
|
|
@ -202,16 +202,6 @@ ssl_stream_cb(GtkWidget * w, gpointer data _U_)
|
|||
|
||||
follow_info = g_new0(follow_info_t, 1);
|
||||
|
||||
/* data will be passed via tap callback*/
|
||||
msg = register_tap_listener("ssl", follow_info, NULL,
|
||||
NULL, ssl_queue_packet_data, NULL);
|
||||
if (msg)
|
||||
{
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"Can't register ssl tap: %s\n",msg->str);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Create a new filter that matches all packets in the SSL stream,
|
||||
and set the display filter entry accordingly */
|
||||
reset_tcp_reassembly();
|
||||
|
@ -242,7 +232,15 @@ ssl_stream_cb(GtkWidget * w, gpointer data _U_)
|
|||
"!(%s)", follow_filter);
|
||||
}
|
||||
|
||||
|
||||
/* data will be passed via tap callback*/
|
||||
msg = register_tap_listener("ssl", follow_info, follow_filter,
|
||||
NULL, ssl_queue_packet_data, NULL);
|
||||
if (msg)
|
||||
{
|
||||
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK,
|
||||
"Can't register ssl tap: %s\n",msg->str);
|
||||
return;
|
||||
}
|
||||
gtk_entry_set_text(GTK_ENTRY(filter_te), follow_filter);
|
||||
|
||||
/* Run the display filter so it goes in effect - even if it's the
|
||||
|
|
Loading…
Reference in New Issue