ssl,http: rename http-over-ssl to http-over-tls
This name is displayed in the SSL prototcol tree (Application Data Protocol: http-over-tls), rename to avoid possible user confusion. Modify the SSL dissector such that both "http" and "http-over-tls" invoke the same dissector function. Change-Id: I2d52890a8ec8fa88b6390b133a11df607a5ec3dc Reviewed-on: https://code.wireshark.org/review/17481 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
29a243d61c
commit
7c7497a77e
|
@ -3584,7 +3584,7 @@ proto_register_http(void)
|
|||
|
||||
http_handle = register_dissector("http", dissect_http, proto_http);
|
||||
http_tcp_handle = register_dissector("http-over-tcp", dissect_http_tcp, proto_http);
|
||||
http_ssl_handle = register_dissector("http-over-ssl", dissect_http_ssl, proto_http);
|
||||
http_ssl_handle = register_dissector("http-over-tls", dissect_http_ssl, proto_http); /* RFC 2818 */
|
||||
http_sctp_handle = register_dissector("http-over-sctp", dissect_http_sctp, proto_http);
|
||||
|
||||
http_module = prefs_register_protocol(proto_http, reinit_http);
|
||||
|
|
|
@ -4162,6 +4162,15 @@ ssl_starttls_post_ack(dissector_handle_t ssl_handle, packet_info *pinfo,
|
|||
return ssl_starttls(ssl_handle, pinfo, app_handle, pinfo->num - 1);
|
||||
}
|
||||
|
||||
dissector_handle_t
|
||||
ssl_find_appdata_dissector(const char *name)
|
||||
{
|
||||
/* Accept 'http' for backwards compatibility and sanity. */
|
||||
if (!strcmp(name, "http"))
|
||||
name = "http-over-tls";
|
||||
return find_dissector(name);
|
||||
}
|
||||
|
||||
/* Functions for TLS/DTLS sessions and RSA private keys hashtables. {{{ */
|
||||
static gint
|
||||
ssl_equal (gconstpointer v, gconstpointer v2)
|
||||
|
@ -4488,7 +4497,7 @@ ssl_parse_key_list(const ssldecrypt_assoc_t *uats, GHashTable *key_hash, const c
|
|||
ssl_debug_printf("ssl_init port '%d' filename '%s' password(only for p12 file) '%s'\n",
|
||||
port, uats->keyfile, uats->password);
|
||||
|
||||
handle = find_dissector(uats->protocol);
|
||||
handle = ssl_find_appdata_dissector(uats->protocol);
|
||||
ssl_association_add(dissector_table_name, main_handle, handle, port, tcp);
|
||||
}
|
||||
|
||||
|
@ -5214,7 +5223,7 @@ ssl_dissect_hnd_hello_ext_alpn(ssl_common_dissect_t *hf, tvbuff_t *tvb,
|
|||
/* ProtocolName match, so set the App data dissector handle.
|
||||
* This may override protocols given via the UAT dialog, but
|
||||
* since the ALPN hint is precise, do it anyway. */
|
||||
handle = find_dissector(alpn_proto->dissector_name);
|
||||
handle = ssl_find_appdata_dissector(alpn_proto->dissector_name);
|
||||
ssl_debug_printf("%s: changing handle %p to %p (%s)", G_STRFUNC,
|
||||
(void *)session->app_handle,
|
||||
(void *)handle, alpn_proto->dissector_name);
|
||||
|
|
|
@ -471,6 +471,9 @@ WS_DLL_PUBLIC guint32
|
|||
ssl_starttls_post_ack(dissector_handle_t ssl_handle, packet_info *pinfo,
|
||||
dissector_handle_t app_handle);
|
||||
|
||||
extern dissector_handle_t
|
||||
ssl_find_appdata_dissector(const char *name);
|
||||
|
||||
/** set the data and len for the stringInfo buffer. buf should be big enough to
|
||||
* contain the provided data
|
||||
@param buf the buffer to update
|
||||
|
|
|
@ -3653,7 +3653,7 @@ ssldecrypt_uat_fld_protocol_chk_cb(void* r _U_, const char* p, guint len _U_, co
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (!find_dissector(p)) {
|
||||
if (!ssl_find_appdata_dissector(p)) {
|
||||
if (proto_get_id_by_filter_name(p) != -1) {
|
||||
*err = g_strdup_printf("While '%s' is a valid dissector filter name, that dissector is not configured"
|
||||
" to support SSL decryption.\n\n"
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
"127.0.0.1","443","http-over-ssl","TEST_KEYS_DIRrsasnakeoil2.key",""
|
||||
"127.0.0.1","9131","http-over-ssl","TEST_KEYS_DIRkey.p12","WebAS"
|
||||
"127.0.0.1","443","http","TEST_KEYS_DIRrsasnakeoil2.key",""
|
||||
"127.0.0.1","9131","http","TEST_KEYS_DIRkey.p12","WebAS"
|
||||
|
|
|
@ -201,7 +201,7 @@ decryption_step_ssl_rsa_pq() {
|
|||
TEST_KEYS_FILE="`cygpath -w $TEST_KEYS_FILE`"
|
||||
fi
|
||||
$TESTS_DIR/run_and_catch_crashes env $TS_DC_ENV $TSHARK $TS_DC_ARGS -Tfields -e http.request.uri \
|
||||
-o ssl.keys_list:"0.0.0.0,443,http-over-ssl,$TEST_KEYS_FILE" \
|
||||
-o ssl.keys_list:"0.0.0.0,443,http,$TEST_KEYS_FILE" \
|
||||
-r "$CAPTURE_DIR/rsa-p-lt-q.pcap" -Y http \
|
||||
| grep / > /dev/null 2>&1
|
||||
RETURNVALUE=$?
|
||||
|
|
Loading…
Reference in New Issue